0.0.4 • Published 5 years ago
@nativescript/eslint-plugin v0.0.4
NativeScript ESLint Plugin
ESLint rules for NativeScript projects.
Installation and setup
- Install
npm i -D @nativescript/eslint-plugin @typescript-eslint/parser eslint- Add an
.eslintrc.jsonconfig file with the following content.
.eslintrc.json
{
"parser": "@typescript-eslint/parser",
"parserOptions": {
"sourceType": "module",
"ecmaVersion": 2015
},
"plugins": ["@nativescript"],
"extends": [
"plugin:@nativescript/recommended"
]
}- Lint the project.
npx eslint --ext=ts src/Notice that you need to provide the path to your source code. In the example above, we use src/. Change that to match your project setup.
- Fix all auto-fixable problems.
npx eslint --ext=ts --fix src/- Optional Set up VSCode to use
eslint.
- Install the
dbaeumer.vscode-eslintextension. - Add the following to your
settings.jsonfile:
"eslint.validate": [ "typescript", "javascript" ],0.0.3
5 years ago
0.0.3-next.3
5 years ago
0.0.4
5 years ago
0.0.2
5 years ago
0.0.3-next.1
5 years ago
0.0.3-next.2
5 years ago
0.0.3-next.0
5 years ago
0.0.1
5 years ago