0.1.4 • Published 4 years ago
@speedy-js/eslint-config
Licence
—
Version
0.1.4
Deps
8
Size
15 kB
Vulns
0
Weekly
0
@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-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