tiendeo-lint
Installation
- Install
@tiendeo/lint
package:
npm i -D @tiendeo/lint
- 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
:
"lint": "./node_modules/.bin/eslint ./src",
"stylelint": "./node_modules/.bin/stylelint ./src",
"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]
Format Styled-Components
$ npm run stylelint -- --fix [options]
Recommended setup