@globalfishingwatch/linting

3.0.2 • Public • Published

@globalfishingwatch/linting

npm version GitHub license

Monorepo eslint config with some custom rules and prettier integration

Installation

npx install-peerdeps --dev @globalfishingwatch/linting

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

Usage

Eslint

Flat config >= v9

to your eslint.config.mjs:

import gfwConfig from '@globalfishingwatch/linting'

export default gfwConfig

Legacy usage < v9

  1. Add to your .eslintrc:
{
  "extends": "@globalfishingwatch/linting/legacy"
}
  1. Add the config to either your package.json:

JS

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

Prettier

to your .prettierrc.js:

export default '@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

Package Sidebar

Install

npm i @globalfishingwatch/linting

Weekly Downloads

16

Version

3.0.2

License

MIT

Unpacked Size

10.4 kB

Total Files

7

Last publish

Collaborators

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