1.8.6 • Published 2 years ago

@strut-software/eslint-config v1.8.6

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Lint Rules

Description

This package contains a set of ESLint configs to be used across Strut Software Solutions projects and Rithm Software projects. This is to ensure each project has the same set of rules to keep projects consistent.

Configs

Config files exist for the following use cases and are summarized below. You can mix and match these as needed and several configs inherit other configs automatically.

  • javascript - Recommended rules for projects using JavaScript.
  • typescript - Recommended rules for projects using TypeScript.
    • Includes and modifies the rules from javascript as TypeScript is a superset of JavaScript.
  • angular - Recommended rules for projects using Angular.
    • Includes and modifies the rules from typescript and rxjs as Angular uses TypeScript and RxJS by default.
  • angular-html - Recommended template (HTML) rules for projects using Angular.
    • Used in conjunction with @angular-eslint/template-parser.
  • rxjs - Recommended rules for projects using the RxJS library.

Installation

From the root folder of your project, install the package with the following command:

npm i @strut-software/eslint-config --save-dev

Usage

Once the package is installed, add the desired configs to the "extends" section of the eslintrc.json in the root of your project:

{
    "root": true,
    "ignorePatterns": [
        "projects/**/*"
    ],
    "overrides": [
        {
            "files": [
                "*.ts"
            ],
            "parserOptions": {
                "project": [
                    "tsconfig.json"
                ],
                "createDefaultProgram": true
            },
            "extends": [
                "@strut-software/eslint-config/angular"
            ],
            ...
        }
        ...
    ]
}

Afterwards, you will be able to run your desired lint command to use the newly-imported lint rules.

NOTE: Keeping this package up to date is highly recommended. Be sure that the version number in your package.json contains a ^ before the version number to update to the newest minor version when using npm update.

Example:

"devDependencies": {
    ...
    "@strut-software/eslint-config": "^1.1.0",
    ...
}

Package maintenance

Uses a token from NPM as a github secret - this secret is stored in the org level.

0.0.0

2 years ago

1.8.6

2 years ago

1.8.5

2 years ago

1.8.4

2 years ago

1.8.3

2 years ago

1.8.0

2 years ago

1.7.0

2 years ago

1.6.1

2 years ago

1.6.0

3 years ago

1.5.0

3 years ago

1.4.0

3 years ago

1.3.0

3 years ago

1.2.1

3 years ago