eslint-config-src
v1.0.3
Published
All centralized configurations for ESLint
Readme
eslint-config-src
All centralized configurations for ESLint.
The configurations are organized around the following use cases from JavaScript at src :
(
src/usecase/nodejs) : JavaScript for Node.js applications (and thus including Electron)(
src/usecase/browser-vue): JavaScript for browsers for Vue.js applications(
src/usecase/browser-commonjs): JavaScript for browsers using CommonJS and generating a bundle (with Browserify/WebPack)(
src/usecase/browser-modern): JavaScript for modern browsers supporting ES2015 and higher(
src/usecase/browser): JavaScript for all browsers even older ones(
src/usecase/test-jest): Tests with Jest(
src/usecase/test-mocha): Tests with Mocha
Installation
# Using npm
npm install eslint-config-src --save-devExample
You have to add an .eslintrc.js file at the root of your project with the following content:
module.exports = {
extends: 'src/usecase/nodejs'
}If you want to use it in Jest tests replace the .eslintrc.js file content with :
module.exports = {
extends: 'src/usecase/test-jest'
}If you want to use it in Mocha tests replace .eslintrc.js file content with :
module.exports = {
extends: 'src/usecase/test-mocha'
}