3.0.2 • Published 5 months ago

@marknjunge/eslint-config-ts v3.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

eslint-config-ts

npm (scoped)

My ESLint config for Typescript.

Usage

  1. Initialize ESLint based on the documentation: Getting Started with ESLint
npm init @eslint/config@latest
  1. Install the package
npm install -D @marknjunge/eslint-config-ts
  1. Replace tseslint.configs.recommended with the config.
+ import markConfig from "@marknjunge/eslint-config-ts";

export default defineConfig([
  { files: ["**/*.{js,mjs,cjs,ts}"], plugins: { js }, extends: ["js/recommended"], },
  { files: ["**/*.{js,mjs,cjs,ts}"], languageOptions: { globals: globals.node }, },
+ markConfig,
- tseslint.configs.recommended,
]);

Alternatively to override rules,

export default defineConfig([
  // Default configs ...
  {
    files: ["**/*.{js,mjs,cjs,ts}"],
    plugins: { js },
    extends: [markConfig],
    rules: {
      '@typescript-eslint/require-await': 'warn',
      '@typescript-eslint/no-misused-promises': 'warn'
    }
  },
]);

See Using a Shareable Config for other ways to use the config.

Note: You may need to include eslint.config.mjs in your tsconfig.json

{
  "include": [
    "src/**/*",
+    "eslint.config.mjs",
  ],
}
3.0.2

5 months ago

3.0.1

6 months ago

3.0.0

6 months ago

2.2.1

2 years ago

2.2.0

2 years ago

2.1.1

2 years ago

2.1.0

2 years ago

1.11.0

2 years ago

1.10.0

2 years ago

2.0.0

2 years ago

1.9.0

2 years ago

1.8.0

3 years ago

1.7.0

3 years ago

1.6.0

4 years ago

1.5.0

4 years ago

1.4.0

4 years ago

1.3.0

4 years ago

1.2.0

4 years ago

1.1.0

4 years ago

1.0.0

4 years ago