-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.js
49 lines (47 loc) · 1.35 KB
/
eslint.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
// eslint.config.js for ESLint 9
const jsxA11y = require('eslint-plugin-jsx-a11y');
const { plugin: tsPlugin } = require('typescript-eslint');
const prettierPlugin = require('eslint-plugin-prettier/recommended');
const importPlugin = require('eslint-plugin-import');
module.exports = [
importPlugin.flatConfigs.recommended,
prettierPlugin,
{
plugins: {
'jsx-a11y': jsxA11y,
'@typescript-eslint': tsPlugin,
},
rules: {
'spaced-comment': ['error', 'always', { exceptions: ['-', '+'] }],
'no-restricted-syntax': 'off',
'object-property-newline': [
'off',
{ allowMultiplePropertiesPerLine: true },
],
'no-underscore-dangle': 'off',
'comma-dangle': ['error', 'always-multiline'],
'import/no-extraneous-dependencies': [
'off',
{ devDependencies: ['util/', '**/*.test.js', '**/*.spec.js'] },
],
'no-console': 'off',
'prettier/prettier': ['error', { singleQuote: true, parser: 'flow' }],
},
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
},
settings: {
'import/resolver': {
typescript: {
extensions: ['.js', '.jsx', '.ts', '.tsx', '.d.ts'],
},
},
},
ignores: [
'coverage/**',
'node_modules',
'packages/enonic-dependencies-resolver/index.js',
],
},
];