tiendeo-lint
Installation
- Install
lintConfig
package:
npm i -D lintConfig
2. Add these lines to package.json
:
"eslintConfig": {
"extends": ["./node_modules/lintconfig/.eslintrc.js"]
},
"stylelint": {
"extends": "./node_modules/lintconfig/stylelint.config.js"
},
Usage
- Add these scripts to the
package.json
:
"eslint": "./node_modules/.bin/eslint ./src",
"stylelint": "./node_modules/.bin/stylelint \"**/*.{js,jsx}\"",
"format": "npm run prettier -- --write --config ./node_modules/lintconfig/.prettierrc.js",
"prettier": "./node_modules/.bin/prettier \"**/*.{js,jsx,css,json}\"",
Lint JS files
$ npm run eslint [options]
Fix JS files
$ npm run eslint -- --fix [options]
Format JS files
$ npm run format [options]
Lint Styled-Components
$ npm run stylelint [options]
Fix Styled-Components
$ npm run stylelint -- --fix [options]
Recommended setup