Skip to content

Commit 110e4f4

Browse files
authored
Add eslint.config.js (WIP - investigating CI failures)
1 parent 0732c2c commit 110e4f4

3 files changed

Lines changed: 279 additions & 18 deletions

File tree

eslint.config.js

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import {FlatCompat} from '@eslint/eslintrc'
2+
import {fileURLToPath} from 'url'
3+
import path from 'path'
4+
5+
const __filename = fileURLToPath(import.meta.url)
6+
const __dirname = path.dirname(__filename)
7+
8+
const compat = new FlatCompat({
9+
baseDirectory: __dirname,
10+
resolvePluginsRelativeTo: path.resolve(__dirname, 'node_modules/eslint-plugin-github'),
11+
})
12+
13+
export default [
14+
{
15+
ignores: ['dist/**'],
16+
},
17+
...compat.extends('plugin:github/recommended', 'plugin:github/browser', 'plugin:github/typescript'),
18+
{
19+
files: ['**/*.js'],
20+
languageOptions: {
21+
parser: (await import('espree')).default,
22+
parserOptions: {
23+
ecmaVersion: 8,
24+
},
25+
},
26+
},
27+
]

0 commit comments

Comments
 (0)