0.3.2 • Published 1 year ago

eslint-config-dasprid v0.3.2

Weekly downloads
-
License
BSD-2-Clause
Repository
-
Last release
1 year ago

eslint-config-dasprid

Strict ESLint configuration for TypeScript projects.

Explanation

Over all the years I developed a very specific coding standard, which I use in both personal and professional projects. Most of the time I was either using no linting or a very soft one. This was usually enough in small team projects or where I was the only contributor. But as soon as more developers joined a team, I had to do a lot of linting on incoming pull requests.

I thus decided to go through all available ESLint rules and compile a config I can reuse across all those projects. This config is only aimed ad TypeScript projects, as I never write projects in pure JavaScript.

Installation

Simply install eslint and eslint-config-dasprid:

npm i -D eslint eslint-config-dasprid

If you are working on a React project, you additional need to install a peer dependency:

npm i -D eslint-plugin-react

Setup

Create a .eslintrc.json file:

{
    "extends": "eslint-config-dasprid",
    "parserOptions": {
        "project": "tsconfig.json"
    }
}

For React projects, you instead extend eslint-config-dasprid/react.

Your tsconfig.json must contain the following settings:

{
    "compilerOptions": {
        "noImplicitAny": true,
        "strictNullChecks": true,
        "importsNotUsedAsValues": "error"
    }
}

Validate on commit

To validate the coding styles on commit, it is recommended to use lint-staged:

npx mrm@2 lint-staged
0.3.2

1 year ago

0.3.0

1 year ago

0.2.0

1 year ago

0.3.1

1 year ago

0.1.15

2 years ago

0.1.14

2 years ago

0.1.13

3 years ago

0.1.10

3 years ago

0.1.11

3 years ago

0.1.12

3 years ago

0.1.9

3 years ago

0.1.8

3 years ago

0.1.7

3 years ago

0.1.6

3 years ago

0.1.5

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago