Skip to content

Commit

Permalink
Update eslint to v9
Browse files Browse the repository at this point in the history
  • Loading branch information
asamuzaK committed Sep 28, 2024
1 parent 267a29d commit b7c09fc
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 7 deletions.
53 changes: 53 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
import importX from 'eslint-plugin-import-x';
import jsdoc from 'eslint-plugin-jsdoc';
import regexp from 'eslint-plugin-regexp';
import neostandard, { plugins as neostdplugins } from 'neostandard';
import globals from 'globals';

export default [
{
ignores: ['src/lib', 'src/web-ext-config.cjs']
},
jsdoc.configs['flat/recommended'],
regexp.configs['flat/recommended'],
...neostandard({
semi: true
}),
{
plugins: {
'@stylistic': neostdplugins['@stylistic'],
'import-x': importX,
regexp
},
linterOptions: {
reportUnusedDisableDirectives: true
},
languageOptions: {
globals: {
...globals.node
},
ecmaVersion: 'latest',
sourceType: 'module'
},
rules: {
'@stylistic/space-before-function-paren': ['error', {
anonymous: 'always',
asyncArrow: 'always',
named: 'never'
}],
'import-x/order': ['error', {
alphabetize: {
order: 'ignore',
caseInsensitive: false
}
}],
'no-await-in-loop': 'error',
'no-use-before-define': ['error', {
allowNamedExports: false,
classes: true,
functions: true,
variables: true
}]
}
}
];
15 changes: 8 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,16 @@
"main": "index.js",
"types": "types/index.d.ts",
"devDependencies": {
"c8": "^9.1.0",
"c8": "^10.1.2",
"chai": "^5.1.1",
"eslint": "^8.57.0",
"eslint-config-standard": "^17.1.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jsdoc": "^48.2.7",
"eslint": "^9.11.1",
"eslint-plugin-import-x": "^4.3.0",
"eslint-plugin-jsdoc": "^50.3.0",
"eslint-plugin-regexp": "^2.6.0",
"mocha": "^10.4.0",
"typescript": "^5.4.5"
"globals": "^15.9.0",
"mocha": "^10.7.3",
"neostandard": "^0.11.6",
"typescript": "^5.6.2"
},
"scripts": {
"build": "npm run tsc && npm run lint && npm run test",
Expand Down

0 comments on commit b7c09fc

Please sign in to comment.