|
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'; |
4 | 3 |
|
5 | | -export default [ |
| 4 | +export default defineConfig([ |
6 | 5 | { |
7 | | - ignores: ['*/', '!src/'], |
| 6 | + ignores: [ |
| 7 | + 'vendor', 'tests', 'x', |
| 8 | + ], |
8 | 9 | }, |
9 | 10 |
|
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 | | - |
20 | 11 | { |
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], |
39 | 18 | }, |
40 | | -]; |
| 19 | +]); |
0 commit comments