ESLint Config
ESLint shareable config
Install
npm install --save-dev @cknow/eslint-config
Usage
ESLint Configuration File Formats
Add some ESLint config to your .eslintrc.js
:
module.exports = {
extends: '@cknow/eslint-config'
}
ESNext
module.exports = {
extends: '@cknow/eslint-config/esnext'
}
Browser
module.exports = {
extends: '@cknow/eslint-config/browser'
}
Usage direct on command line
eslint --config ./node_modules/@cknow/eslint-config/index.js
Note: It is not necessary to create the .eslintrc.js
file.
Plugins
The plugins do not use the default settings.
To this extend @cknow/eslint-config
or @cknow/eslint-config/browser
first.
module.exports = {
extends: ['@cknow/eslint-config', '@cknow/eslint-config/plugins/PLUGIN_NAME']
}
Angular
Install
npm install --save-dev eslint-plugin-angular
Usage
module.exports = {
extends: '@cknow/eslint-config/plugins/angular'
}
AVA
Install
npm install --save-dev eslint-plugin-ava
Usage
module.exports = {
extends: '@cknow/eslint-config/plugins/ava'
}
Jasmine
Install
npm install --save-dev eslint-plugin-jasmine
Usage
module.exports = {
extends: '@cknow/eslint-config/plugins/jasmine'
}
Jest
Install
npm install --save-dev eslint-plugin-jest
Usage
module.exports = {
extends: '@cknow/eslint-config/plugins/Jest'
}
Jquery
Install
npm install --save-dev eslint-plugin-jquery
Usage
module.exports = {
extends: '@cknow/eslint-config/plugins/jquery'
}
Mocha
Install
npm install --save-dev eslint-plugin-mocha
Usage
module.exports = {
extends: '@cknow/eslint-config/plugins/mocha'
}
Node
Install
npm install --save-dev eslint-plugin-node
Usage
module.exports = {
extends: '@cknow/eslint-config/plugins/node'
}
Promise
Install
npm install --save-dev eslint-plugin-promise
Usage
module.exports = {
extends: '@cknow/eslint-config/plugins/promise'
}
Protractor
Install
npm install --save-dev eslint-plugin-protractor
Usage
module.exports = {
extends: '@cknow/eslint-config/plugins/protractor'
}
Vue
Install
npm install --save-dev eslint-plugin-vue
Usage
module.exports = {
extends: '@cknow/eslint-config/plugins/vue'
}