ESLint configuration for NewOrbit
npm install eslint eslint-config-neworbit --save-dev
Add .eslintrc.json
file with the following contents:
{
"extends": [
"neworbit"
]
}
Setup a lint script in your package.json
something like this:
{
...
"scripts": {
...
"lint:typescript": "eslint \"./**/*.{ts,tsx}\""
}
}
-
Install the ESLint extension for VS Code
-
Make sure you have TypeScript files included in your settings:
"eslint.validate": [ "javascript", "javascriptreact", "typescript", "typescriptreact" ]
-
If your
package.json
and.eslintrc.json
files aren't in the root directory you open in VS Code you may need to add working directories in your workspace settings:
{
...
"settings": {
...
"eslint.workingDirectories": [
{
"directory": "{FOLDER_THAT_CONTAINS_CONFIG}"
}
],
}
}
For mapping TSLint rule overrides in your own project to the equivalent ESLint rules please refer to the map. If you cannot find the rule simply Google it as ESLint is plugin based and there is likely a plugin offering the required functionality.
Made with 💖 by NewOrbit in Oxfordshire, and licensed under the MIT Licence