dantes-eslint-config-js
v1.0.3
Published
ESLint config
Downloads
2
Readme
ESLint Global Config
This config package can be used with vue/quasar or vanilla JS projects. Feel free to contribute via creating PR to master
branch. Any changes should be discussed with the Web Team.
Installing
1. Install latest versions of eslint packages
npm i -D eslint@latest \
eslint-config-standard@latest \
eslint-import-resolver-alias@latest \
eslint-plugin-import@latest \
eslint-plugin-n@latest \
eslint-plugin-promise@latest \
eslint-webpack-plugin@latest \
eslint-plugin-vue@latest
OR
yarn add --dev eslint@latest \
eslint-config-standard@latest \
eslint-import-resolver-alias@latest \
eslint-plugin-import@latest \
eslint-plugin-n@latest \
eslint-plugin-promise@latest \
eslint-webpack-plugin@latest \
eslint-plugin-vue@latest
Remove eslint-plugin-vue@latest
in case of Node.js project.
2. Install eslint config
$ npm i -D dantes-eslint-config-js
OR
$ yarn add --dev dantes-eslint-config-js
.eslintrc.js
Quasar with vanilla js
module.exports = {
// ...
parserOptions: {
parser: '@babel/eslint-parser',
ecmaVersion: 'latest', // Allows for the parsing of modern ECMAScript features
sourceType: 'module', // Allows for the use of imports
},
// ...
env: {
browser: true,
es2022: true,
},
// ...
extends: [
'plugin:vue/vue3-recommended',
'standard',
'dantes-eslint-config-js/vue'
],
// ...
}
Quasar with typescript
Work in progress...
Node.js with vanilla js
module.exports = {
root: true,
parserOptions: {
parser: '@babel/eslint-parser',
ecmaVersion: 'latest', // Allows for the parsing of modern ECMAScript features
sourceType: 'module', // Allows for the use of imports
},
env: {
browser: false,
es2022: true,
amd: true,
node: true,
},
extends: [
'standard',
'@tenging/eslint-config-js/node',
],
globals: {
process: 'readonly',
},
}