-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0456ab7
commit 20a4808
Showing
2 changed files
with
47 additions
and
31 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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'), | ||
]; |