@phts/eslint-config v2.1.1
@phts/eslint-config
My config for ESLint.
Install
$ npm i -D @phts/eslint-configUsage
Basic rules
.eslintrc.json:
{
"extends": "@phts"
}Prettier
{
"extends": ["@phts", "@phts/eslint-config/addons/prettier"]
}Enable support for Prettier via eslint-config-prettier and eslint-plugin-prettier for all .js, .jsx, .ts, .tsx files in the project.
Prettier must be installed manually:
$ npm i -D prettierMake sure to put this addon last, so it gets the chance to override other configs.
TypeScript
@typescript-eslint/parser and @typescript-eslint/eslint-plugin are used under the hood.
.eslintrc.json:
{
"extends": ["@phts", "@phts/eslint-config/addons/typescript"]
}package.json:
{
"scripts": {
"lint": "eslint --ext .js,.ts,.tsx ."
}
}SublimeText project:
{
"folders": [
{
"path": "."
}
],
"settings": {
"SublimeLinter.linters.eslint.selector": "source.js, source.ts, source.tsx",
"SublimeLinter.linters.tslint.disable": true
}
}VS Code workspace:
{
"settings": {
// ...
"eslint.validate": ["typescript", "typescriptreact"]
}
}Other addons
2 years ago
2 years ago
3 years ago
3 years ago
4 years ago
5 years ago
5 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago