4.0.2 • Published 1 year ago

@roydukkey/eslint-config v4.0.2

Weekly downloads
3
License
MIT
Repository
github
Last release
1 year ago

ESLint Config

Release Version License

Use this if you like, but I'll probably make changes and might not accept any.

Install

Install the packages:

pnpm add --save-dev \
@roydukkey/eslint-config \
@typescript-eslint/eslint-plugin \
@typescript-eslint/parser \
eslint

Vue

Install the optional peer dependency for linting Vue files.

pnpm add --save-dev eslint-plugin-vue

Configuration

Here is an example for configuring ESLint from the package.json and eslint.config.js.

{
  "script": {
    "lint": "eslint './**/*.@(?(m|c)@(j|t)s|@(j|t)sx|vue)'",
    "lint:fix": "npm run lint -- --fix"
  }
}
import { config } from 'typescript-eslint';
import roydukkeyConfig from '@roydukkey/eslint-config';

export default config(
  ...roydukkeyConfig({
    tsconfigRootDir: import.meta.dirname,
  }),
);

TypeScript

By default, this package will not use the tsconfig.json and instead only searches for tsconfig.eslint.json files. This provides better support for different monorepos.

Also, @typescript-eslint/recommended-requiring-type-checking is applied so don't forget to target the proper environments. For example, the following configuration targets Node:

import { config } from 'typescript-eslint';
import globals from 'globals';

export default config(
  {
    languageOptions: {
      globals: {
        ...globals.node,
      },
    },
  },
);
4.0.1

1 year ago

4.0.0

1 year ago

4.0.2

1 year ago

3.0.2

2 years ago

3.0.1

3 years ago

3.0.0

3 years ago

2.0.3

4 years ago

2.0.2

4 years ago

2.0.4

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago

1.0.13

4 years ago

1.0.12

4 years ago

1.0.11

4 years ago

1.0.10

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago