2.0.3 • Published 1 year ago

@dhi-gras/eslint-config-js v2.0.3

Weekly downloads
17
License
-
Repository
github
Last release
1 year ago

npm (scoped) npm Maintenance

ESLint config for JS projects

Linting rules to be used in JavaScript / ES projects.

Installation

yarn add -D @dhi-gras/eslint-config-js @dhi-gras/eslint-config-react eslint-plugin-jsx-a11y eslint-plugin-react eslint-plugin-react-hooks eslint-plugin-eslint-comments eslint-plugin-import eslint-plugin-json  eslint-plugin-prettier eslint-plugin-radar prettier

If you're not using React, omit @dhi-gras/eslint-config-react eslint-plugin-jsx-a11y eslint-plugin-react eslint-plugin-react-hooks

Extensions

If you're using VSCode, install the ESLint extension. Add to your VSCode settings.json:

"editor.codeActionsOnSave": {
  "source.fixAll.eslint": true,
}

ESLint can also be used in other editors and in CLI.

Linting and formatting should work without installing the Prettier extension, but only in ES/JS/TS files.

Setup

Add to package.json

  "eslintConfig": {
    "extends": [
      "@dhi-gras/react",
      "@dhi-gras/js"
    ]
  },

If you're not using React, omit "@dhi-gras/react"