0.3.2 • Published 7 months ago

eslint-config-dasprid v0.3.2

Weekly downloads
-
License
BSD-2-Clause
Repository
-
Last release
7 months 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

7 months ago

0.3.0

7 months ago

0.2.0

7 months ago

0.3.1

7 months ago

0.1.15

1 year ago

0.1.14

1 year ago

0.1.13

2 years ago

0.1.10

2 years ago

0.1.11

2 years ago

0.1.12

2 years ago

0.1.9

2 years ago

0.1.8

2 years ago

0.1.7

2 years ago

0.1.6

2 years ago

0.1.5

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago