0.1.4 • Published 4 years ago
@speedy-js/eslint-config v0.1.4
@speedy-js/eslint-config
ESLint config for Speedy Framework Developers
Features
- Indent with 2 spaces and always semicolon
- Best practice with
js、ts、reactor their bundle!
Install
npm i -D @speedy-js/eslint-config
# OR: npm install -D eslint @speedy-js/eslint-configUsage
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