@stencila/eslint-config-stencil

2.0.5 • Public • Published

@stencila/eslint-config-stencil

Adding rules

When adding a rule, prefer error over warn as warnings tend to be ignored, whereas errors can not. If a rule is fixable (i.e. using the --fix makes errors go away) then there is no inconvenience anyway by making it an error instead of a warning.

General Usage

It's recommended that you install this package using NPM v7 or higher. This will ensure that any peerDependencies are automatically installed for you.

From the project where you would like to use these settings, run:

npm install --save-dev @stencila/eslint-config-stencil

Then modify your package.json to include the following code block. If you already have a eslintConfig configuration defined there, you’ll need to modify it.

  // …
  "eslintConfig": {
    // If your project is inside a monorepo, include `"root": true`, otherwise it can be omitted
    "root": true,
    "extends": "@stencila/eslint-config-stencil",
    "parserOptions": {
      "project": "./tsconfig.json"
    }
  }
  // …

Installing with NPM v6 and below

For usage with NPM v6 and below, please follow the peerDependency warning messages shown in your console when running the above command, or see the list of peerDependencies in the package.json file and install them manually.

This is necessary because ESLint runs plugins relative to the end consuming project's root, you need to install the all required plugins as dependencies of the project. For details see ESLint documentation.

References

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
2.0.52latest

Version History

VersionDownloads (Last 7 Days)Published
2.0.52
2.0.41
2.0.31
2.0.21
2.0.11
2.0.01

Package Sidebar

Install

npm i @stencila/eslint-config-stencil

Weekly Downloads

7

Version

2.0.5

License

Apache-2.0

Unpacked Size

18.7 kB

Total Files

5

Last publish

Collaborators

  • nokome
  • stencila-ci
  • ketch