@xola/jslint v3.0.2
ESLint Configuration
This repository serves as the source for all of Xola's ESLint configuration using XO, a pluggable ESLint wrapper. This package should be installed for every Xola React app
Required Script Commands
Add the following commands in the scripts section of your package.json
"scripts": {
"xola-lint": "xola-lint",
"lint": "xola-lint src",
"lint:report": "xola-lint --reporter=json src > eslint_report.json && echo 'ESLint report saved to eslint_report.json'",
},Run Tests
To run ESLint against your entire source just run
npm run lintIf you would like to run lint against a specific file then invoke the xola-lint directly:
npm run xola-lint -- src/components/Alert.jsxRules
This uses the XO package along with several ES Lint rule packages customized for Xola's needs. Additionally it will use our prettier configuration to validate other needs.
Files used:
.xo-config.jsonContains the core ESLint rules- The
prettierkey inpackage.jsoncontains the default prettier rules
Run npm run xola-lint --print-config .xo-config.json to see all the rules
Fixing
You can automatically fix several violations by running:
npm run xola-lint -- <directory> --fix1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
5 years ago
5 years ago