Skip to content

rubensworks/eslint-config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Jan 28, 2025
b464ed0 · Jan 28, 2025

History

47 Commits
Jun 5, 2024
Feb 28, 2024
Sep 25, 2020
Sep 25, 2020
Jan 28, 2025
Jun 5, 2024
Feb 28, 2024
Jan 28, 2025
Jan 28, 2025
Jan 28, 2025
Sep 25, 2020
Feb 28, 2024
Jan 28, 2025

Repository files navigation

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.