Giter Site home page Giter Site logo

eslint-plugin's Introduction

๐Ÿšจ DEPRECATED ๐Ÿšจ

Ionic, Capacitor, and Stencil projects are now using the following Pretter + ESLint configs:

@ionic/eslint-plugin

Common ESLint rules & preferences for Ionic.

Usage

Install

npm i -D eslint @ionic/eslint-plugin

Configure

Create .eslintrc.js, or otherwise configure ESLint to use the Ionic ESLint Plugin.

  • You must manually configure env to setup your ESLint environment.
  • You must manually configure parserOptions to point to your tsconfig.json and configure any additional options.
module.exports = {
  env: {
    browser: true,
    node: true,
    es6: true,
  },
  parserOptions: {
    project: './tsconfig.json',
    ecmaFeatures: {
      jsx: true,
    },
  },
  plugins: ['@ionic'],
  extends: ['plugin:@ionic/recommended'], // or use `plugin:@ionic/strict`
  rules: {
    // additional rule configuration
  }
};

Flavors

  • plugin:@ionic/crucial: Builds on top of @typescript-eslint/recommended and eslint:recommended.
  • plugin:@ionic/recommended: Recommended set of rules.
  • plugin:@ionic/strict: Stricter set of rules for very consistent code. Good for new projects.

eslint-plugin's People

Contributors

imhoffd avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

anshcena

eslint-plugin's Issues

Won't work with vscode + prettier

Error while loading rule '@typescript-eslint/no-unnecessary-type-assertion '/src/app/app.component.ts:: You have used a rule which requires parserServices to be generated. You must therefore provide a value for the "parserOptions.project" property for @typescript-eslint/parser.
Occurred while linting /src/app/app.component.ts

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.