@globalfishingwatch/linting

2.1.3 • Public • Published

@globalfishingwatch/linting

npm version GitHub license

Eslint config based on eslint-config-react-app with some custom rules and prettier integration

Installation

npx install-peerdeps --dev @globalfishingwatch/linting

# or
yarn add @globalfishingwatch/linting -D --peer

Usage

Eslint

Now add the config to either your package.json:

JS

{
  "eslintConfig": {
    "extends": "@globalfishingwatch/linting"
  }
}

to your .eslintrc:

{
  "extends": "@globalfishingwatch/linting"
}

Javascript

{
  "eslintConfig": {
    "extends": "@globalfishingwatch/linting/javascript"
  }
}

to your .eslintrc:

{
  "extends": "@globalfishingwatch/linting/javascript"
}

Next

{
  "eslintConfig": {
    "extends": "@globalfishingwatch/linting/next"
  }
}

to your .eslintrc:

{
  "extends": "@globalfishingwatch/linting/next"
}

Prettier

to your .prettierrc:

module.exports = require('@globalfishingwatch/linting/prettier')

Recommendations

VS Code

Install the ESLint and Prettier VSCode extensions:

ext install esbenp.prettier-vscode dbaeumer.vscode-eslint

Copy this to settings.json

  "editor.defaultFormatter": "esbenp.prettier-vscode",
  "editor.formatOnSave": false, // avoids running the format twice,
  "eslint.autoFixOnSave": true,
  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": true
  },

LICENCE

MIT

Dependencies (0)

    Dev Dependencies (20)

    Package Sidebar

    Install

    npm i @globalfishingwatch/linting

    Weekly Downloads

    92

    Version

    2.1.3

    License

    MIT

    Unpacked Size

    9.02 kB

    Total Files

    8

    Last publish

    Collaborators

    • javiabia
    • rdgfuentes
    • j8seangel
    • global-fishing-watch