@sagent/lint
TypeScript icon, indicating that this package has built-in type declarations

0.0.19 • Public • Published

Sagent Lint - npm package containing all linters

HOW LINT SCSS IN AN APP/PROJECT

  1. Install npm package
    npm i --save-dev @sagent/brand
  1. Install stylelint
    npm install --save-dev stylelint stylelint-config-standard-scss
  1. Add script (optional) to package.json of the app
    {
        "scripts": [
            "style-lint": "npx stylelint \"**/*.scss\"",
        ]
    }
  1. Add config file to the root of the app/lib .stylelintrc or .stylelintrc.json
    {
        "extends": [
            "stylelint-config-standard-scss",
            "./src/lib/stylelint/sagent-stylelint-rules"
        ]
    }
  1. Run script
    npm run style-lint

AVAILABLE PLUGINS

    https://github.com/stylelint/awesome-stylelint#plugins

ESLINT

  1. Install
    npm i @sagent/lint
  1. Modify .eslintrc.json or .eslintrc in the project root
    {
        ...
        "overrides": [
            {
                "files": [
                    "*.ts"
                ],
                ...
                "extends": [
                    "./node_modules/@sagent/lint/src/eslint/sagent-eslint-rules-for-ts.json"
                ],
                ...
            },
            {
                "files": [
                    "*.html"
                ],
                "extends": [
                    "./node_modules/@sagent/lint/src/eslint/sagent-eslint-rules-for-html.json"
                ],
                ...
            }
        ]
    }
  1. Rules included in the config @typescript-eslint and @angular-eslint

Readme

Keywords

none

Package Sidebar

Install

npm i @sagent/lint

Weekly Downloads

1

Version

0.0.19

License

none

Unpacked Size

7.01 kB

Total Files

13

Last publish

Collaborators

  • agorodnichev
  • jackrus
  • jerrolkrause