This package provides OpusCapita's base .eslintrc as an extensible shared config.
ESLint is a tool for guarantee a code style consistency across developers team. It helps to take a code more clear and readable. For example it detects an unused variables. Also with linting you automatically avoid common pit-falls
Our default export contains all of our ESLint rules, including ECMAScript 2015+ and React.
It requires:
- eslint version >=4.14.0 or 5.
- Only for applications using Babel Transpiler: babel-eslint version >=8.1.2, 9, 10 or 11 (additionally requires @babel/core and expects a valid Babel configuration file to exist, see here for details).
- Only for React.js applications: eslint-plugin-react version >=7.5.1.
npm install --save-dev -E eslint-config-opuscapita eslint@"^5.16.0" babel-eslint@"^10.0.1" eslint-plugin-react@"^7.12.4"- add
"extends": "opuscapita"to your .eslintrc
.eslintrc example:
{
"extends": "opuscapita",
"env": {
"jasmine": true,
"browser": true,
"node": true,
"es6": true
}
}It unnecessary to run npm run eslint every time for error checking. Your editor able to highlight an errors on fly.
Some users prefer this way.
How to enable ESLint in your editor
npm run lint -- --fix
- Kirill Volkovich kirill.volkovich@jcatalog.com
- Daniel Zhitomirsky daniel.zhitomirsky@jcatalog.com
- Alexey Sergeev alexey.sergeev@jcatalog.com
OpusCapita ESLint config is licensed under the Apache License, Version 2.0. See LICENSE for the full license text.