@rubensworks/eslint-config

3.0.0 • Public • Published

ESLint Config

Build status npm version

This is a repository for my personal ESLint configurations.

Install

$ yarn add -D @rubensworks/eslint-config eslint

or

$ npm install -D @rubensworks/eslint-config eslint

ESLint config

eslint.config.js:

const config = require('@rubensworks/eslint-config');

module.exports = config([
  {
    files: [ '**/*.ts' ],
    languageOptions: {
      parserOptions: {
        tsconfigRootDir: __dirname,
        project: [ './tsconfig.eslint.json' ],
      },
    },
  },
  {
    // Override rules like this
    rules: {
      'no-implicit-coercion': 'off'
    },
  }
);

.eslintignore:

node_modules
coverage

**/*.js
**/*.d.ts
**/*.js.map

tsconfig.eslint.json: (Needed to force the TS compiler to also consider test files)

{
  "extends": "./tsconfig.json",
  "include": [
    "index.ts",
    "lib/**/*.ts",
    "test/**/*.ts",
    "bin/**/*.ts"
  ],
  "exclude": [
    "**/node_modules"
  ]
}

Recommended package additions

.gitignore:

.eslintcache

package.json:

{
  "scripts": {
    "lint": "eslint . --ext .ts --cache"
  }
}

License

This software is written by Ruben Taelman.

This code is released under the MIT license.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 3.0.0
    152
    • latest

Version History

Package Sidebar

Install

npm i @rubensworks/eslint-config

Weekly Downloads

245

Version

3.0.0

License

MIT

Unpacked Size

15.9 kB

Total Files

7

Last publish

Collaborators

  • rubensworks