-
Notifications
You must be signed in to change notification settings - Fork 78
/
eslint.config.js
55 lines (52 loc) · 1.46 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
50
51
52
53
54
55
const globals = require('globals');
const eslint = require('@eslint/js');
const stylisticJs = require('@stylistic/eslint-plugin-js');
const nodePlugin = require('eslint-plugin-n');
module.exports = [
eslint.configs.recommended,
stylisticJs.configs['disable-legacy'],
nodePlugin.configs['flat/recommended'],
{
languageOptions: {
ecmaVersion: 2022,
sourceType: 'module',
globals: {
...globals.node,
...globals.jest,
},
},
plugins: {
'@stylistic/js': stylisticJs,
},
rules: {
'@stylistic/js/semi': ['error', 'always'],
'@stylistic/js/quotes': ['error', 'single'],
'@stylistic/js/indent': ['error', 2],
'@stylistic/js/comma-dangle': ['error', 'always-multiline'],
'@stylistic/js/function-call-argument-newline': ['error', 'consistent'],
'@stylistic/js/array-bracket-newline': ['error', { 'multiline': true }],
'@stylistic/js/dot-location': ['error', 'property'],
'@stylistic/js/arrow-parens': ['error', 'always'],
'@stylistic/js/arrow-spacing': ['error', {before: true, after: true}],
},
},
{
files: ['packages/*/src/**/*.{js}'],
},
{
settings: {
node: {
version: '>=18.0.0',
},
},
rules: {
// Leave this off. This rule cannot handle monorepos
'n/no-missing-import': ['off'],
'n/no-unsupported-features/es-builtins': [
'error', {
'ignores': [],
},
],
},
},
];