2.1.14 • Published 5 years ago

@kampaay/eslint-config-kampaay-react v2.1.14

Weekly downloads
-
License
EUPL-1.2
Repository
github
Last release
5 years ago

@kampaay/eslint-config-kampaay-react

version npm version license

Kampaay’s ESLint shared configuration for React.

Installation

Use the configuration for a ready-to-lint React setup.

Install with npm:

npx install-peerdeps --dev @kampaay/eslint-config-kampaay-react

or with yarn:

npm info @kampaay/eslint-config-kampaay-react peerDependencies --json | command sed 's/[\{\},]//g ; s/: /@/g' | xargs yarn add @kampaay/eslint-config-kampaay-react -D

Add scripts to your package.json:

{
  "scripts": {
    "lint": "eslint . --ext .js,.jsx,.ts,.tsx",
    "lint:fix": "npm run lint -- --fix"
  },
  "eslintConfig": {
    "extends": ["@kampaay/eslint-config-kampaay-react"]
  }
}

Integrate with VS Code

You probably want your editor to lint and fix for you.

Here are the instructions for VS Code:

  1. Install the ESLint extension

  2. Create .vscode folder and inside settings.json write:

{
  "javascript.validate.enable": true,
  "typescript.validate.enable": true,

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

  "eslint.format.enable": true,
  "[javascript]": {
    "editor.formatOnSave": false,
    "editor.defaultFormatter": "dbaeumer.vscode-eslint"
  },
  "[javascriptreact]": {
    "editor.formatOnSave": false,
    "editor.defaultFormatter": "dbaeumer.vscode-eslint"
  },
  "[typescript]": {
    "editor.formatOnSave": false,
    "editor.defaultFormatter": "dbaeumer.vscode-eslint"
  },
  "[typescriptreact]": {
    "editor.formatOnSave": false,
    "editor.defaultFormatter": "dbaeumer.vscode-eslint"
  }
}

License

Copyright (c) 2020 Kampaay Srl

Licensed under the EUPL 🇪🇺, Version 1.2 only (the "Licence")

You may not use this work except in compliance with the Licence.

You may obtain a copy of the Licence online at the EUPL.eu webite.

Unless required by applicable law or agreed to in writing, software distributed under the Licence is distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

See the Licence for the specific language governing permissions and limitations under the Licence.

2.1.14

5 years ago

2.1.13

5 years ago

2.1.12

5 years ago

2.1.11

5 years ago

2.1.8

5 years ago

2.1.7

5 years ago

2.1.6

5 years ago

2.1.4

5 years ago

2.1.1

6 years ago

2.1.0

6 years ago