Skip to content

InterNations/eslint-plugin-internations

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

⚠️ DEPRECATED ⚠️

Instead use https://github.com/InterNations/community/tree/prod/eslint-plugin

This repository should be removed along with the classic site.


eslint-plugin-internations

npm version

Custom ESLint rules and recommended rule configuration for internal InterNations usage.

Installation

You'll first need to install ESLint:

$ npm i eslint --save-dev

Next, install eslint-plugin-internations and its peer dependencies:

(
  export PKG=eslint-plugin-internations;
  npm info "$PKG@latest" peerDependencies --json | command sed 's/[\{\},]//g ; s/@/@/g' | xargs npm install --save-dev "$PKG@latest"
)

Note: If you installed ESLint globally (using the -g flag) then you must also install eslint-plugin-internations and its peer dependencies globally.

Usage

Add internations to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

{
    "plugins": [
        "internations"
    ]
}

Then, add plugin:internations/recommended to the extends section:

{
    "extends": [
        "plugin:internations/recommended"
    ]
}

You may optionally configure any specific rules you want to override under the rules section:

{
    "rules": {
        "internations/rule-name": "error"
    }
}