mirror of
https://github.com/shivammathur/setup-php.git
synced 2026-01-23 00:58:57 +07:00
Fix eslint config for imports
This commit is contained in:
@@ -1,9 +1,7 @@
|
|||||||
import {fixupConfigRules, fixupPluginRules} from '@eslint/compat';
|
import {fixupConfigRules, fixupPluginRules} from '@eslint/compat';
|
||||||
// eslint-disable-next-line import/no-unresolved
|
|
||||||
import typescriptEslint from '@typescript-eslint/eslint-plugin';
|
import typescriptEslint from '@typescript-eslint/eslint-plugin';
|
||||||
import jest from 'eslint-plugin-jest';
|
import jest from 'eslint-plugin-jest';
|
||||||
import globals from 'globals';
|
import globals from 'globals';
|
||||||
// eslint-disable-next-line import/no-unresolved
|
|
||||||
import tsParser from '@typescript-eslint/parser';
|
import tsParser from '@typescript-eslint/parser';
|
||||||
import path from 'node:path';
|
import path from 'node:path';
|
||||||
import {fileURLToPath} from 'node:url';
|
import {fileURLToPath} from 'node:url';
|
||||||
@@ -46,6 +44,21 @@ export default [
|
|||||||
parser: tsParser,
|
parser: tsParser,
|
||||||
ecmaVersion: 2021,
|
ecmaVersion: 2021,
|
||||||
sourceType: 'module'
|
sourceType: 'module'
|
||||||
|
},
|
||||||
|
|
||||||
|
settings: {
|
||||||
|
'import/resolver': {
|
||||||
|
typescript: {
|
||||||
|
alwaysTryTypes: true,
|
||||||
|
project: './tsconfig.json'
|
||||||
|
},
|
||||||
|
node: {
|
||||||
|
extensions: ['.js', '.ts']
|
||||||
|
}
|
||||||
|
},
|
||||||
|
'import/parsers': {
|
||||||
|
'@typescript-eslint/parser': ['.ts']
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|||||||
Reference in New Issue
Block a user