eslint-config-stable
v0.10.0
Published
ESLint Stable Configs.
Downloads
228
Maintainers
Readme
ESLint Config Stable
ESLint config based on Javascript Popular Convention.
And Major ESLint plugins at once!
eslint-plugin-import
eslint-plugin-unicorn
@typescript-eslint/eslint-plugin
Installaion
eslint <= 7
use [email protected]eslint 8
use [email protected]
npm install eslint-config-stable -D
Usage
Available Configs.
stable/javascript
(default, aliasstable
)stable/typescript
Javascript
.eslintrc.js
module.exports = {
extends: [
'stable',
],
}
Typescript
.eslintrc.js
module.exports = {
extends: [
'stable',
'stable/typescript',
],
parserOptions: {
tsconfigRootDir: __dirname,
project: ['./tsconfig.json'],
},
}
Vue + Typescript
.eslintrc.js
module.exports = {
parser: 'vue-eslint-parser',
extends: [
'plugin:vue/essential',
'stable',
'stable/typescript',
],
parserOptions: {
extraFileExtensions: ['.vue'],
parser: '@typescript-eslint/parser',
tsconfigRootDir: __dirname,
project: ['./tsconfig.json'],
},
}
Javascript + Typescript
.eslintrc.js
module.exports = {
overrides: [
{
files: [
'**/*.ts',
],
extends: [
'stable',
'stable/typescript',
],
parserOptions: {
tsconfigRootDir: __dirname,
project: ['./tsconfig.json'],
},
},
{
files: [
'**/*.js',
],
extends: [
'stable',
],
},
],
}
Vue + Javascript + Typescript
.eslintrc.js
module.exports = {
overrides: [
{
files: [
'**/*.ts',
'**/*.vue',
],
parser: 'vue-eslint-parser',
extends: [
'plugin:vue/essential',
'stable',
'stable/typescript',
],
parserOptions: {
extraFileExtensions: ['.vue'],
parser: '@typescript-eslint/parser',
tsconfigRootDir: __dirname,
project: ['./tsconfig.json'],
},
},
{
files: [
'**/*.js',
],
extends: [
'stable',
],
},
],
}