2020-07-09 00:16:08 +10:00
module . exports = {
2021-01-16 13:26:10 +11:00
parser : "@typescript-eslint/parser" , // Specifies the ESLint parser
2020-07-09 00:16:08 +10:00
extends : [
2021-01-16 13:26:10 +11:00
"plugin:@typescript-eslint/recommended" , // Uses the recommended rules from the @typescript-eslint/eslint-plugin
2022-01-22 18:14:39 +11:00
"prettier" ,
2021-01-16 13:26:10 +11:00
"plugin:prettier/recommended" , // Enables eslint-plugin-prettier and displays prettier errors as ESLint errors. Make sure this is always the last configuration in the extends array.
2017-11-19 20:49:10 -08:00
] ,
2020-07-09 00:16:08 +10:00
parserOptions : {
2021-01-16 13:26:10 +11:00
project : "tsconfig.json" ,
2020-07-09 00:16:08 +10:00
ecmaVersion : 2018 , // Allows for the parsing of modern ECMAScript features
2021-01-16 13:26:10 +11:00
sourceType : "module" , // Allows for the use of imports
2017-11-19 20:49:10 -08:00
} ,
2021-04-14 09:40:42 +10:00
settings : {
"import/resolver" : {
typescript : { } ,
} ,
} ,
2022-01-22 18:14:39 +11:00
plugins : [ "import" , "simple-import-sort" ] ,
2019-08-31 17:41:23 +10:00
rules : {
2021-04-14 09:40:42 +10:00
// Place to specify ESLint rules. Can be used to overwrite rules specified from the extended configs
// e.g. "@typescript-eslint/explicit-function-return-type": "off",
2021-01-16 13:26:10 +11:00
"@typescript-eslint/no-use-before-define" : "off" ,
"@typescript-eslint/no-unused-vars" : [
"error" ,
2020-07-09 00:16:08 +10:00
{
2021-01-16 13:26:10 +11:00
argsIgnorePattern : "^_" ,
varsIgnorePattern : "^_" ,
2020-07-09 00:16:08 +10:00
} ,
] ,
2021-04-14 09:40:42 +10:00
"@typescript-eslint/explicit-module-boundary-types" : "off" ,
"@typescript-eslint/explicit-member-accessibility" : "error" ,
2021-10-23 18:09:09 +11:00
"@typescript-eslint/consistent-type-imports" : "warn" ,
2021-04-14 09:40:42 +10:00
"import/no-default-export" : "error" ,
"import/no-named-as-default-member" : "off" ,
"simple-import-sort/imports" : "warn" ,
"simple-import-sort/exports" : "warn" ,
"no-undef" : "off" ,
"new-cap" : "error" ,
curly : "error" ,
2020-07-09 00:16:08 +10:00
} ,
2022-10-17 00:46:57 +11:00
ignorePatterns : [ "/*.js" , "test" ] ,
2019-08-31 17:41:23 +10:00
} ;