Skip to content

Commit 3fc07f0

Browse files
build: bump eslint v9 (#39)
* build: migrate eslint v9 * chore: fmt * 🤖 Documentation auto-update --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 3d42497 commit 3fc07f0

File tree

6 files changed

+1989
-1295
lines changed

6 files changed

+1989
-1295
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ Parameters:
162162
- `params.entries`: The entries of the documentation (functions, constants and classes).
163163
- `params.options`: Optional configuration to render the Markdown content. See `types.ts` for details.
164164

165-
[:link: Source](https://github.com/peterpeterparker/tsdoc-markdown/tree/main/src/lib/markdown.ts#L277)
165+
[:link: Source](https://github.com/peterpeterparker/tsdoc-markdown/tree/main/src/lib/markdown.ts#L280)
166166

167167
### :gear: generateDocumentation
168168

eslint.config.mjs

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
import {FlatCompat} from '@eslint/eslintrc';
2+
import js from '@eslint/js';
3+
import typescriptEslint from '@typescript-eslint/eslint-plugin';
4+
import tsParser from '@typescript-eslint/parser';
5+
import globals from 'globals';
6+
import path from 'node:path';
7+
import {fileURLToPath} from 'node:url';
8+
9+
// eslint-disable-next-line no-redeclare
10+
const __filename = fileURLToPath(import.meta.url);
11+
// eslint-disable-next-line no-redeclare
12+
const __dirname = path.dirname(__filename);
13+
const compat = new FlatCompat({
14+
baseDirectory: __dirname,
15+
recommendedConfig: js.configs.recommended,
16+
allConfig: js.configs.all
17+
});
18+
19+
export default [
20+
{
21+
ignores: [
22+
'**/dist/',
23+
'**/jest.config.js',
24+
'**/*.spec.ts',
25+
'**/*.test.ts',
26+
'**/mock.ts',
27+
'bin/index.js'
28+
]
29+
},
30+
{languageOptions: {globals: globals.node}},
31+
...compat.extends('eslint:recommended', 'plugin:@typescript-eslint/recommended'),
32+
{
33+
plugins: {
34+
'@typescript-eslint': typescriptEslint
35+
},
36+
languageOptions: {
37+
parser: tsParser,
38+
ecmaVersion: 5,
39+
sourceType: 'script',
40+
parserOptions: {
41+
project: ['./tsconfig.eslint.json']
42+
}
43+
},
44+
rules: {
45+
'@typescript-eslint/consistent-type-imports': 'error'
46+
}
47+
}
48+
];

0 commit comments

Comments
 (0)