Last active
March 9, 2020 10:23
-
-
Save shiftgeist/ccd15ed186f83eaaaa616e8e7d2843d3 to your computer and use it in GitHub Desktop.
Vue default typescript eslint config.
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
module.exports = { | |
plugins: ['@typescript-eslint'], | |
parserOptions: { | |
parser: require.resolve('@typescript-eslint/parser'), | |
ecmaVersion: 2020 | |
}, | |
extends: [ | |
'eslint-config-standard', | |
'plugin:@typescript-eslint/eslint-recommended', | |
'plugin:@typescript-eslint/recommended' | |
], | |
rules: { | |
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off', | |
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off' | |
// add custom rules | |
// ------> | |
// here | |
// <------ | |
}, | |
overrides: [{ | |
files: ['*.ts', '*.tsx'], | |
rules: { | |
// The core 'no-unused-vars' rules (in the eslint:recommeded ruleset) | |
// does not work with type definitions | |
'no-unused-vars': 'off', | |
} | |
}] | |
} |
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
{ | |
"root": true, | |
"parser": "@typescript-eslint/parser", | |
"parserOptions": { | |
"ecmaVersion": 6, | |
"sourceType": "module" | |
}, | |
"plugins": [ | |
"@typescript-eslint" | |
], | |
"rules": { | |
"@typescript-eslint/class-name-casing": "warn", | |
"@typescript-eslint/semi": "warn", | |
"curly": "warn", | |
"eqeqeq": "warn", | |
"no-throw-literal": "warn", | |
"semi": "off" | |
} | |
} |
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
"eslint-config-standard" | |
"@typescript-eslint/eslint-plugin", | |
"@typescript-eslint/parser" | |
from @vue/eslint-config-typescript |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment