generated from mlibrary/ruby-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.js
49 lines (48 loc) · 1.37 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
import globals from 'globals';
import mochaPlugin from 'eslint-plugin-mocha';
import pluginJs from '@eslint/js';
import stylistic from '@stylistic/eslint-plugin';
export default [
pluginJs.configs.all,
mochaPlugin.configs.flat.recommended,
{
languageOptions: {
globals: {
...globals.browser,
...globals.chai,
...globals.mocha,
...globals.node
}
}
},
stylistic.configs['recommended-flat'],
{
plugins: {
'@stylistic': stylistic
},
rules: {
'@stylistic/brace-style': ['error', '1tbs'],
'@stylistic/comma-dangle': ['error', 'never'],
'@stylistic/operator-linebreak': ['error', 'before'],
'@stylistic/quote-props': ['error', 'as-needed'],
'@stylistic/semi': ['error', 'always'],
'@stylistic/space-before-function-paren': ['error', 'always'],
'@stylistic/spaced-comment': ['error', 'always', { block: { balanced: true } }],
'arrow-body-style': ['error', 'always'],
'max-lines-per-function': 'off',
'max-statements': 'off',
'no-ternary': 'off',
'one-var': ['error', { initialized: 'never' }],
'sort-imports': ['error', { ignoreCase: true }]
}
},
{
files: ['test/**/*.spec.js'],
rules: {
'func-names': 'off',
'no-magic-numbers': 'off',
'no-unused-expressions': 'off',
'prefer-arrow-callback': 'off'
}
}
];