Skip to content
This repository was archived by the owner on Mar 7, 2025. It is now read-only.

Commit 5cabbb8

Browse files
committed
Define some extensions
1 parent a7541bb commit 5cabbb8

File tree

5 files changed

+40
-2
lines changed

5 files changed

+40
-2
lines changed

.eslintrc.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,14 @@ module.exports = defineConfig({
2929

3030
'@typescript-eslint/ban-ts-comment': 'off',
3131
'@typescript-eslint/explicit-function-return-type': ['error', { allowExpressions: true }],
32-
'@typescript-eslint/indent': ['error', 2, { SwitchCase: 1, ignoredNodes: ['MemberExpression'] }],
32+
'@typescript-eslint/indent': [
33+
'error',
34+
2,
35+
{
36+
SwitchCase: 1,
37+
ignoredNodes: ['MemberExpression', 'TSTypeParameterInstantiation']
38+
}
39+
],
3340
'@typescript-eslint/interface-name-prefix': 'off',
3441
'@typescript-eslint/member-ordering': 'warn',
3542
'@typescript-eslint/no-explicit-any': 'off',
@@ -92,6 +99,7 @@ module.exports = defineConfig({
9299
'embertest',
93100
'globals',
94101
'greasemonkey',
102+
'jsdoc',
95103
'nashorn',
96104
'phantomjs',
97105
'prototypejs',

src/extends/eslint-plugin-import.d.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/**
2+
* Eslint import extensions.
3+
*
4+
* @see [Eslint import extensions](https://github.com/benmosher/eslint-plugin-import#installation)
5+
*/
6+
export type EslintPluginImportExtensions =
7+
| 'plugin:import/errors'
8+
| 'plugin:import/warnings'
9+
| 'plugin:import/typescript';

src/extends/eslint-plugin-jsdoc.d.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/**
2+
* Eslint JSDoc extensions.
3+
*
4+
* @see [Eslint JSDoc extensions](https://github.com/gajus/eslint-plugin-jsdoc#configuration)
5+
*/
6+
export type EslintPluginJsdocExtensions = 'plugin:jsdoc/recommended';
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/**
2+
* Eslint Prettier extensions.
3+
*
4+
* @see [Eslint Prettier extensions](https://github.com/prettier/eslint-plugin-prettier#recommended-configuration)
5+
*/
6+
export type EslintPluginPrettierExtensions = 'plugin:prettier/recommended' | 'prettier';

src/extends/index.d.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,20 @@
11
import type { LiteralUnion } from '../utility-types';
22
import type { EslintExtensions } from './eslint';
3+
import type { EslintPluginImportExtensions } from './eslint-plugin-import';
4+
import type { EslintPluginJsdocExtensions } from './eslint-plugin-jsdoc';
5+
import type { EslintPluginPrettierExtensions } from './eslint-plugin-prettier';
36
import type { TypescriptEslintExtensions } from './typescript-eslint';
47

58
/**
69
* All known extensions.
710
*/
8-
export type KnownExtensions = LiteralUnion<EslintExtensions | TypescriptEslintExtensions>;
11+
export type KnownExtensions = LiteralUnion<
12+
| EslintExtensions
13+
| TypescriptEslintExtensions
14+
| EslintPluginPrettierExtensions
15+
| EslintPluginImportExtensions
16+
| EslintPluginJsdocExtensions
17+
>;
918

1019
/**
1120
* Extending Configuration Files.

0 commit comments

Comments
 (0)