-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy patheslint.config.js
34 lines (31 loc) · 1.04 KB
/
eslint.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import shlink from '@shlinkio/eslint-config-js-coding-standard';
import { defineConfig } from 'eslint/config';
import { configs as eslintAstroConfigs } from 'eslint-plugin-astro';
/* eslint-disable-next-line no-restricted-exports */
export default defineConfig(
shlink,
// react-external-link states is a ESM ("type": "module"), but then exposes a CommonJS module as its main entry point.
// This works around that.
{
languageOptions: {
sourceType: 'module',
ecmaVersion: 'latest',
},
},
{
files: ['**/*.astro'],
extends: eslintAstroConfigs.recommended,
settings: {
// eslint-plugin-import needs to know what parser to use for certain file types
'import/parsers': {
'astro-eslint-parser': ['.astro'],
espree: ['.js', '.mjs'],
},
},
rules: {
// Linter is throwing a false positive on the usage of `class` property when it should be className, but in astro
// files, `class` is correct
'react/no-unknown-property': ['error', { ignore: ['class'] }],
},
},
);