-
Notifications
You must be signed in to change notification settings - Fork 113
/
Copy patheslint.config.mjs
41 lines (39 loc) · 1.31 KB
/
eslint.config.mjs
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
import globals from 'globals';
import eslintPluginEslint from '@eslint/js';
import eslintPluginStylistic from '@stylistic/eslint-plugin-js';
const config = [
{
files: ['**/*.js'],
languageOptions: {
globals: {
...globals.browser,
...globals.node,
define: 'readonly',
L: 'writable'
}
},
plugins: {
...eslintPluginStylistic.configs['all-flat'].plugins
},
rules: {
...eslintPluginEslint.configs['recommended'].rules,
...eslintPluginStylistic.configs['all-flat'].rules,
'@stylistic/js/brace-style': ['error', '1tbs'],
'@stylistic/js/comma-dangle': ['error', 'only-multiline'],
'@stylistic/js/dot-location': ['error', 'property'],
'@stylistic/js/function-call-argument-newline': ['error', 'consistent'],
'@stylistic/js/indent': ['error', 'tab'],
'@stylistic/js/multiline-comment-style': 'off',
'@stylistic/js/no-tabs': 'off',
'@stylistic/js/object-curly-spacing': ['error', 'always'],
'@stylistic/js/padded-blocks': 'off',
'@stylistic/js/quotes': ['error', 'single'],
'@stylistic/js/quote-props': ['error', 'consistent-as-needed'],
'@stylistic/js/semi': ['error', 'always'],
'@stylistic/js/space-before-function-paren': ['error', 'never'],
'no-lonely-if': 'error',
'no-unused-expressions': ['error', { allowTernary: true }]
}
}
];
export default config;