1.1.0 • Published 4 years ago

@metrewards/eslint-config v1.1.0

Weekly downloads
17
License
MIT
Repository
-
Last release
4 years ago

@metrewards/eslint-config

This package provides ESLint and Prettier settings as an extensible shared config.

Install

npx install-peerdeps @metrewards/eslint-config

Usage

You should see a list of devDependencies in your package.json.

Create a eslintrc.json file in your project root (same directory as your `package.json)

{
  "extends": "@metrewards"
}

Setup VSCode

To setup VSCode to lint and format your code, do the following:

  1. Install Prettier as a VSCode extension.

  2. Install ESLint as a VSCode extension.

  3. Setup VSCode settings to make ESLint format our files on save via Code/FilePreferencesSettings, click the {} icon to edit settings.json and enter the following:

// eslint-prettier settings BEGIN 
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
  "source.fixAll.eslint": true,
    "editor.action.formatDocument": true
},
"[javascriptreact]": {
  "editor.formatOnSave": false,
},
"[javascript]": {
  "editor.formatOnSave": false,
},
"files.autoSave": "afterDelay"
// eslint-prettier settings END

Your files should now format when you save.

1.1.0

4 years ago

1.0.11

5 years ago

1.0.10

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago