0.1.14 • Published 2 years ago

@mtth/eslint-plugin v0.1.14

Weekly downloads
197
License
MIT
Repository
github
Last release
2 years ago

ESLint plugin

Shared linting configuration.

Quickstart

First, install ESLint and this plugin:

$ npm i -D eslint @mtth/eslint-plugin

Then reference this plugin in .eslintrc.js:

module.exports = {
  plugins: ['@mtth'],
  extends: ['plugin:@mtth/typescript'], // One of the configurations below.
  // Project-specific configuration...
};

Configurations

  • typescript, defaults for a TypeScript project. The corresponding parser is included in the plugin.

Next steps

This plugin is best used in combination with this prettier configuration and the following convenience scripts:

{
  "fix": "npm run pretty && npm run lint -- --fix",
  "lint": "eslint '{src,test}/**/*.{ts,tsx}'",
  "pretty": "prettier --write '{src,test}/**/*.{ts,tsx}'"
}

We also recommend enabling pre-commit hooks with husky and lint-staged. For example, within your package.json:

{
  "husky": {
    "hooks": {
      "pre-commit": "lint-staged"
    }
  },
  "lint-staged": {
    "*.ts": [
      "prettier --write",
      "eslint --fix"
    ]
  }
}
0.1.14

2 years ago

0.1.10

2 years ago

0.1.11

2 years ago

0.1.12

2 years ago

0.1.13

2 years ago

0.1.9

2 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.2

3 years ago

0.1.3

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago