-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.js
41 lines (40 loc) · 1.01 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
const eslint = require('@eslint/js');
const tseslint = require('typescript-eslint');
const prettierConfig = require('eslint-config-prettier');
const jestPlugin = require('eslint-plugin-jest');
/** @type {import('@typescript-eslint/utils').TSESLint.FlatConfig.ConfigFile} */
module.exports = tseslint.config(
eslint.configs.recommended,
tseslint.configs.recommended,
prettierConfig,
{
ignores: ['dist'],
plugins: { jest: jestPlugin },
languageOptions: {
globals: jestPlugin.environments.globals.globals,
},
rules: {
quotes: ['error', 'single'],
indent: [
'error',
2,
{
SwitchCase: 1,
},
],
'linebreak-style': ['error', 'unix'],
semi: ['error', 'always'],
'comma-dangle': ['error', 'always-multiline'],
'dot-notation': 'error',
eqeqeq: [
'error',
'always',
{
null: 'ignore',
},
],
curly: ['error', 'all'],
'brace-style': ['error'],
},
},
);