Socket
Socket
Sign inDemoInstall

@nativescript/eslint-plugin

Package Overview
Dependencies
4
Maintainers
19
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nativescript/eslint-plugin


Version published
Maintainers
19
Created

Readme

Source

NativeScript ESLint Plugin

ESLint rules for NativeScript projects.

Installation and setup

  1. Install
npm i -D @nativescript/eslint-plugin @typescript-eslint/parser eslint
  1. Add an .eslintrc.json config file with the following content.

.eslintrc.json

{
  "parser": "@typescript-eslint/parser",
  "parserOptions": {
    "sourceType": "module",
    "ecmaVersion": 2015
  },
  "plugins": ["@nativescript"],
  "extends": [
    "plugin:@nativescript/recommended"
  ]
}
  1. 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.

  1. Fix all auto-fixable problems.
npx eslint --ext=ts --fix src/
  1. [Optional] Set up VSCode to use eslint.
  • Install the dbaeumer.vscode-eslint extension.
  • Add the following to your settings.json file:
"eslint.validate": [ "typescript", "javascript" ],

Keywords

FAQs

Last updated on 01 Apr 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc