@digitalthinkers/eslint-config-react

1.1.0 • Public • Published

ESLint Config React

ESLint shared configuration package for Digital Thinkers. Use it in other projects like this (.eslintrc.js):

module.exports = {
    extends: '@digitalthinkers/eslint-config-react'
}

Use these rules if the project is based on Next.js:

module.exports = {
    extends: '@digitalthinkers/eslint-config-react',
    rules: {
        'react/react-in-jsx-scope': 'off',
        'jsx-a11y/anchor-is-valid': 'off'
    }
}

VSCode prerequisites

ESLint extension must be enabled.

Insert the following snippet into settings.json. (This is required by ESLint, so it can run it's formatting rules)


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

The following editor options are proven to work with the current setup. If you have problems with the linter, try setting these:


    "editor.defaultFormatter": "dbaeumer.vscode-eslint",
    "editor.detectIndentation": false,
    "eslint.format.enable": true,
    "eslint.lintTask.enable": true,
    "eslint.validate": ["javascript", "javascriptreact", "typescript", "typescriptreact"],

Readme

Keywords

Package Sidebar

Install

npm i @digitalthinkers/eslint-config-react

Weekly Downloads

1

Version

1.1.0

License

ISC

Unpacked Size

3.61 kB

Total Files

3

Last publish

Collaborators

  • oliver_halasz
  • szalair
  • nagypeti
  • adamk-dt
  • dankhazim