-
Notifications
You must be signed in to change notification settings - Fork 15
/
eslint.config.js
47 lines (45 loc) · 1.36 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
// @ts-check
const { FlatCompat } = require('@eslint/eslintrc');
const typescriptEslintParser = require('@typescript-eslint/parser');
const eslintPluginPrettier = require('eslint-plugin-prettier');
const eslintPluginJest = require('eslint-plugin-jest');
const tsEslintPlugin = require('@typescript-eslint/eslint-plugin');
const compat = new FlatCompat({
baseDirectory: __dirname,
});
module.exports = [
{
files: ['**/*.ts', '**/*.tsx'],
languageOptions: {
ecmaVersion: 2018, // Allows for the parsing of modern ECMAScript features
sourceType: 'module', // Allows for the use of imports
parser: typescriptEslintParser,
},
plugins: {
'@typescript-eslint': tsEslintPlugin,
prettier: eslintPluginPrettier,
jest: eslintPluginJest,
},
rules: {
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/no-unused-vars': [
'error',
{
varsIgnorePattern: '^_',
argsIgnorePattern: '^_',
},
],
'@typescript-eslint/camelcase': 'off',
'prettier/prettier': [
'error',
{
endOfLine: 'auto',
},
],
},
},
...compat.extends('plugin:@typescript-eslint/recommended'),
...compat.extends('plugin:prettier/recommended'),
...compat.extends('plugin:jest/recommended'),
];