@speedy-js/eslint-config
ESLint config for Speedy Framework Developers
Features
- Indent with 2 spaces and always semicolon
- Best practice with
js
、ts
、react
or their bundle!
Install
npm i -D @speedy-js/eslint-config
# OR: npm install -D eslint @speedy-js/eslint-config
Usage
Lint All
In .eslintrc.js
:
module.exports = {
extends: ["@speedy-js/eslint-config"],
};
This enable lint for both js
、ts
and react
! you'll also need typescript
as a devDependnecy at your project.
Lint TypeScript
In .eslintrc.js
:
module.exports = {
extends: ["@speedy-js/eslint-config/ts"],
};
You need specify --ext
explicitly to enable TypeScript linting:
{
"lint": "eslint src/** --ext .js,.jsx,.ts,.tsx --fix"
}
Lint JavaScript
In .eslintrc.js
:
module.exports = {
extends: ["@speedy-js/eslint-config/js"],
};
Lint React
In .eslintrc.js
:
module.exports = {
extends: ["@speedy-js/eslint-config/react"],
};
License
MIT © ULIVZ