-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
96 lines (93 loc) · 3.01 KB
/
index.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
import importPlugin from 'eslint-plugin-import';
import globals from 'globals';
import eslintJs from '@eslint/js';
const languageOptions = {
globals: {
...globals.es2021,
},
ecmaVersion: 2023,
sourceType: 'module',
};
const rules = {
'array-bracket-newline': ['error', 'consistent'],
'array-bracket-spacing': 'error',
'array-element-newline': ['error', 'consistent'],
'arrow-body-style': ['error', 'always'],
'arrow-parens': ['error', 'always'],
'arrow-spacing': 'error',
'block-scoped-var': 'error',
'block-spacing': ['error', 'never'],
'brace-style': ['error', '1tbs', {'allowSingleLine': true}],
'comma-dangle': ['error', 'always-multiline'],
'comma-spacing': 'error',
'comma-style': 'error',
'computed-property-spacing': 'error',
'consistent-return': 'error',
'curly': ['error', 'all'],
'dot-location': ['error', 'property'],
'eol-last': 'error',
'eqeqeq': 'error',
'func-call-spacing': 'error',
'function-paren-newline': ['error', 'consistent'],
'import/first': 'error',
'indent': ['error', 4],
'key-spacing': 'error',
'keyword-spacing': 'error',
'linebreak-style': ['error', 'unix'],
'lines-between-class-members': 'error',
'max-len': ['error', {'code': 160}],
'new-parens': 'error',
'no-array-constructor': 'error',
'no-caller': 'error',
'no-duplicate-imports': 'error',
'no-else-return': 'error',
'no-eval': 'error',
'no-floating-decimal': 'error',
'no-implied-eval': 'error',
'no-multi-assign': 'error',
'no-multi-spaces': 'error',
'no-multi-str': 'error',
'no-new': 'error',
'no-new-func': 'error',
'no-new-object': 'error',
'no-proto': 'error',
'no-return-assign': ['error', 'always'],
'no-script-url': 'error',
'no-self-compare': 'error',
'no-shadow-restricted-names': 'error',
'no-throw-literal': 'error',
'no-trailing-spaces': 'error',
'no-unneeded-ternary': 'error',
'no-unused-expressions': 'error',
'no-var': 'error',
'no-whitespace-before-property': 'error',
'object-curly-newline': 'error',
'object-curly-spacing': 'error',
'object-shorthand': 'error',
'operator-linebreak': ['error', 'before'],
'quotes': ['error', 'single', {'avoidEscape': true}],
'radix': 'error',
'require-unicode-regexp': 'error',
'rest-spread-spacing': 'error',
'semi': ['error', 'always'],
'semi-spacing': 'error',
'semi-style': 'error',
'space-before-function-paren': ['error', {'anonymous': 'always', 'named': 'never', 'asyncArrow': 'always'}],
'space-in-parens': 'error',
'space-unary-ops': 'error',
'switch-colon-spacing': 'error',
'unicode-bom': 'error',
'yoda': ['error', 'never', {'onlyEquality': true}],
};
export default {
default: [
eslintJs.configs.recommended,
importPlugin.flatConfigs.errors,
importPlugin.flatConfigs.warnings,
{
name: 'nepada/default',
languageOptions,
rules,
},
],
};