Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 0 additions & 19 deletions .eslintrc.js

This file was deleted.

52 changes: 26 additions & 26 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
name: Release @doist/eslint-plugin-doist package

on:
push:
tags:
- 'v*'
push:
tags:
- "v*"

jobs:
publish:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
publish:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v4

# Publish to GitHub package registry
- uses: actions/setup-node@v1
with:
node-version: 12
registry-url: https://npm.pkg.github.com/
scope: '@doist'
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
# Publish to GitHub package registry
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://npm.pkg.github.com/
scope: "@doist"
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}

# Publish to npm registry
- uses: actions/setup-node@v1
with:
node-version: 12
registry-url: https://registry.npmjs.org/
scope: '@doist'
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_PUBLISH_TOKEN}}
# Publish to npm registry
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://registry.npmjs.org/
scope: "@doist"
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_PUBLISH_TOKEN}}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
**/node_modules/**

.claude/settings.local.json
36 changes: 36 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
'use strict';

const js = require('@eslint/js');
const eslintPlugin = require('eslint-plugin-eslint-plugin');
const nodePlugin = require('eslint-plugin-n');
const globals = require('globals');

module.exports = [
js.configs.recommended,
eslintPlugin.configs['flat/recommended'],
nodePlugin.configs['flat/recommended-script'],
{
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'commonjs',
globals: {
...globals.node,
},
},
},
{
files: ['tests/**/*.js'],
languageOptions: {
globals: {
...globals.mocha,
},
},
},
{
files: ['eslint.config.js'],
rules: {
'n/no-extraneous-require': 'off',
'n/no-unpublished-require': 'off',
},
},
];
5 changes: 4 additions & 1 deletion lib/helpers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ function requireStringLiteralArgs({ context, node, name, indexes = [0] } = {}) {
node.arguments[index] &&
!isStringLiteral(node.arguments[index])
) {
context.report(node, `${name} arguments[${index}] needs to be a string literal`);
context.report({
node,
message: `${name} arguments[${index}] needs to be a string literal`
});
}
}
}
Expand Down
1 change: 1 addition & 0 deletions node-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v22
Loading