@kampaay/eslint-config-kampaay

Kampaay’s ESLint shared configuration


Keywords
🥂, eslint, eslint-config
License
EUPL-1.2
Install
npm install @kampaay/eslint-config-kampaay@2.1.13

Documentation

@kampaay/eslint-config-kampaay

version npm version license

Kampaay’s ESLint shared configuration.

Installation

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

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

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"]
  }
}

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": false,
  "typescript.validate.enable": false,
  "tslint.enable": false,

  "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.