-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.mjs
More file actions
43 lines (38 loc) · 899 Bytes
/
eslint.config.mjs
File metadata and controls
43 lines (38 loc) · 899 Bytes
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
import path from 'node:path';
import {includeIgnoreFile} from '@eslint/compat';
import js from '@eslint/js';
import {configs, plugins} from 'eslint-config-airbnb-extended';
const gitignorePath = path.resolve('.', '.gitignore');
const jsConfig = [
// ESLint Recommended Rules
{
name: 'js/config',
...js.configs.recommended,
},
// Stylistic Plugin
plugins.stylistic,
// Import X Plugin
plugins.importX,
// Airbnb Base Recommended Config
...configs.base.recommended,
{
rules: {
'no-console': [0],
'@stylistic/max-len': ['error', {code: 120}]
}
}
];
const nodeConfig = [
// Node Plugin
plugins.node,
// Airbnb Node Recommended Config
...configs.node.recommended,
];
export default [
// Ignore .gitignore files/folder in eslint
includeIgnoreFile(gitignorePath),
// Javascript Config
...jsConfig,
// Node Config
...nodeConfig,
];