-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy patheslint.config.js
46 lines (37 loc) · 1.2 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
import globals from 'globals';
import pluginJs from '@eslint/js';
import tseslint from 'typescript-eslint';
import stylistic from '@stylistic/eslint-plugin';
/* ========================================================================== */
/** @type {import('eslint').Linter.Config[]} */
export default [
{ files: ['**/*.{js,mjs,cjs,ts}'] },
{ languageOptions: { globals: globals.browser } },
pluginJs.configs.recommended,
...tseslint.configs.recommended,
{
plugins: { '@stylistic': stylistic },
rules: {
// This rule enforces at least one newline at the end of
// non-empty files.
'@stylistic/eol-last': ['error', 'always'],
// This rule enforces a consistent indentation style.
'@stylistic/indent': ['error', 'tab'],
'@stylistic/max-len': ['error', {
code: 120,
comments: 80,
ignoreTemplateLiterals: true,
ignoreUrls: true
}],
'@stylistic/padding-line-between-statements': ['error', {
blankLine: 'always',
next: 'return',
prev: '*',
}],
// This rule enforces the consistent use of single quotes.
'@stylistic/quotes': ['error', 'single'],
// This rule enforces consistent use of semicolons.
'@stylistic/semi': ['error', 'always']
}
}
];