Skip to content

Commit b162bb2

Browse files
committed
uses @nette/eslint-plugin
1 parent 34db9f3 commit b162bb2

File tree

2 files changed

+17
-40
lines changed

2 files changed

+17
-40
lines changed

eslint.config.js

Lines changed: 13 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,19 @@
1-
import globals from 'globals';
2-
import pluginJs from '@eslint/js';
3-
import stylistic from '@stylistic/eslint-plugin';
1+
import nette from '@nette/eslint-plugin';
2+
import { defineConfig } from 'eslint/config';
43

5-
export default [
4+
export default defineConfig([
65
{
7-
ignores: ['*/', '!src/'],
6+
ignores: [
7+
'vendor', 'tests', 'x',
8+
],
89
},
910

10-
pluginJs.configs.recommended,
11-
12-
stylistic.configs.customize({
13-
indent: 'tab',
14-
braceStyle: '1tbs',
15-
arrowParens: true,
16-
semi: true,
17-
jsx: false,
18-
}),
19-
2011
{
21-
languageOptions: {
22-
ecmaVersion: 'latest',
23-
globals: globals.browser,
24-
},
25-
plugins: {
26-
'@stylistic': stylistic,
27-
},
28-
rules: {
29-
'@stylistic/no-multiple-empty-lines': ['error', { max: 2, maxEOF: 0 }],
30-
'@stylistic/new-parens': ['error', 'never'],
31-
'@stylistic/padded-blocks': 'off',
32-
'func-style': ['error', 'declaration', { allowArrowFunctions: true }],
33-
'prefer-arrow-callback': 'error',
34-
'arrow-body-style': 'error',
35-
'eqeqeq': ['error', 'always', { null: 'ignore' }],
36-
'no-var': 'error',
37-
'prefer-const': 'off',
38-
},
12+
files: [
13+
'*.js',
14+
'src/**/*.js',
15+
],
16+
17+
extends: [nette.configs.recommended],
3918
},
40-
];
19+
]);

package.json

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
{
22
"type": "module",
33
"devDependencies": {
4-
"@eslint/js": "^9.4.0",
5-
"@stylistic/eslint-plugin": "^2.1.0",
6-
"eslint": "^9.4.0",
7-
"globals": "^15.3.0"
4+
"@nette/eslint-plugin": "^0.2",
5+
"eslint": "^9.26.0"
86
},
97
"scripts": {
10-
"lint": "eslint",
11-
"lint:fix": "eslint --fix"
8+
"lint": "eslint --cache",
9+
"lint:fix": "eslint --cache --fix"
1210
}
1311
}

0 commit comments

Comments
 (0)