0.0.18 • Published 6 years ago

eslint-config-davemcc v0.0.18

Weekly downloads
-
License
MIT
Repository
gitlab
Last release
6 years ago

eslint-config-davemcc

Get up and running quickly with:

  • ESLint
  • Prettier
  • Typescript support

Installing

In an npm project run:

npx install-peerdeps --dev eslint-config-davemcc

Create a .eslintrc file in the root of the project directory:

{
  "extends": ["davemcc"],
  // Override rules:
  "rules": {
    "lines-between-class-members": "on",
    "prettier/prettier": [
        "error",
        {
          "printWidth": 80,
          "tabWidth": 2
        }
      ]
  }
}

Alternatively, put this object in package.json under the property "eslintConfig".

VSCode

Add the following to VSCode settings.json:

// ESLint
"eslint.autoFixOnSave": true,
"eslint.validate": [
    "javascript",
        {
            // Enable auto fix for .ts files too
            "language": "typescript",
            "autoFix": true
        },
    ],
// Prettier
"prettier.disableLanguages": [
    "javascript",
    "typescript"
],

With the above settings, ESLint will run on save. If you have Prettier installed as a VSCode extensions for fixing e.g. .html files, that's fine, but make sure to include the above code.

See autoFixOnSave doesn't work for TypeScript

0.0.18

6 years ago

0.0.17

6 years ago

0.0.16

6 years ago

0.0.15

6 years ago

0.0.14

6 years ago

0.0.13

6 years ago

0.0.12

6 years ago

0.0.11

6 years ago

0.0.10

6 years ago

0.0.9

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.3

6 years ago

0.0.1

6 years ago