-
-
Notifications
You must be signed in to change notification settings - Fork 86
Expand file tree
/
Copy patheslint.config.js
More file actions
132 lines (131 loc) · 3.36 KB
/
Copy patheslint.config.js
File metadata and controls
132 lines (131 loc) · 3.36 KB
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
import js from '@eslint/js';
import importX from 'eslint-plugin-import-x';
import mocha from 'eslint-plugin-mocha';
import prettier from 'eslint-plugin-prettier';
import prettierConfig from 'eslint-config-prettier';
import ramda from 'eslint-plugin-ramda';
export default [
js.configs.recommended,
prettierConfig,
{
ignores: [
'node_modules/**',
'dist/**',
'lib/**',
'es/**',
'docs/**',
'coverage/**',
'.nyc_output/**',
'tmp-test-bundle.js',
'types/**',
],
},
{
plugins: {
'import-x': importX,
mocha,
prettier,
ramda,
},
languageOptions: {
ecmaVersion: 2022,
sourceType: 'module',
globals: {
console: 'readonly',
process: 'readonly',
module: 'readonly',
require: 'readonly',
__dirname: 'readonly',
__filename: 'readonly',
exports: 'readonly',
Buffer: 'readonly',
setTimeout: 'readonly',
clearTimeout: 'readonly',
setInterval: 'readonly',
clearInterval: 'readonly',
Promise: 'readonly',
Map: 'readonly',
Set: 'readonly',
WeakMap: 'readonly',
WeakSet: 'readonly',
Symbol: 'readonly',
BigInt: 'readonly',
Proxy: 'readonly',
Reflect: 'readonly',
ArrayBuffer: 'readonly',
DataView: 'readonly',
Int8Array: 'readonly',
Uint8Array: 'readonly',
Uint8ClampedArray: 'readonly',
Int16Array: 'readonly',
Uint16Array: 'readonly',
Int32Array: 'readonly',
Uint32Array: 'readonly',
Float32Array: 'readonly',
Float64Array: 'readonly',
BigInt64Array: 'readonly',
BigUint64Array: 'readonly',
},
},
rules: {
'no-underscore-dangle': 'off',
'no-confusing-arrow': 'off',
'object-curly-newline': 'off',
'import-x/order': [
'error',
{
groups: [
['builtin', 'external', 'internal'],
['parent', 'sibling', 'index'],
],
'newlines-between': 'always',
},
],
'import-x/extensions': ['error', 'always', { ignorePackages: true }],
quotes: ['error', 'single', { avoidEscape: true }],
'prettier/prettier': 'error',
'ramda/always-simplification': 'error',
'ramda/compose-simplification': 'error',
'ramda/eq-by-simplification': 'error',
'ramda/prefer-complement': 'error',
'ramda/prefer-both-either': 'error',
},
},
{
files: ['test/**/*.js', 'test/**/*.mjs'],
plugins: {
mocha,
},
languageOptions: {
globals: {
describe: 'readonly',
it: 'readonly',
before: 'readonly',
after: 'readonly',
beforeEach: 'readonly',
afterEach: 'readonly',
context: 'readonly',
specify: 'readonly',
xdescribe: 'readonly',
xit: 'readonly',
xcontext: 'readonly',
xspecify: 'readonly',
document: 'readonly',
},
},
rules: {
...mocha.configs.recommended.rules,
'mocha/no-mocha-arrows': 'off',
'mocha/max-top-level-suites': 'off',
'mocha/no-setup-in-describe': 'off',
'mocha/consistent-spacing-between-blocks': 'off',
'no-unused-vars': 'off',
},
},
{
files: ['**/*.cjs'],
languageOptions: {
sourceType: 'commonjs',
},
},
];