mirror of
https://github.com/shivammathur/setup-php.git
synced 2025-09-14 16:54:07 +07:00
Bump version to 2.32.0
Update Node.js dependencies Migrate eslint config to a mjs file Fix imports in tests Bump to Node.js 20.x in workflows
This commit is contained in:
51
eslint.config.mjs
Normal file
51
eslint.config.mjs
Normal file
@ -0,0 +1,51 @@
|
||||
import {fixupConfigRules, fixupPluginRules} from '@eslint/compat';
|
||||
// eslint-disable-next-line import/no-unresolved
|
||||
import typescriptEslint from '@typescript-eslint/eslint-plugin';
|
||||
import jest from 'eslint-plugin-jest';
|
||||
import globals from 'globals';
|
||||
// eslint-disable-next-line import/no-unresolved
|
||||
import tsParser from '@typescript-eslint/parser';
|
||||
import path from 'node:path';
|
||||
import {fileURLToPath} from 'node:url';
|
||||
import js from '@eslint/js';
|
||||
import {FlatCompat} from '@eslint/eslintrc';
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = path.dirname(__filename);
|
||||
const compat = new FlatCompat({
|
||||
baseDirectory: __dirname,
|
||||
recommendedConfig: js.configs.recommended,
|
||||
allConfig: js.configs.all
|
||||
});
|
||||
|
||||
export default [
|
||||
...fixupConfigRules(
|
||||
compat.extends(
|
||||
'eslint:recommended',
|
||||
'plugin:@typescript-eslint/eslint-recommended',
|
||||
'plugin:@typescript-eslint/recommended',
|
||||
'plugin:import/errors',
|
||||
'plugin:import/warnings',
|
||||
'plugin:import/typescript',
|
||||
'plugin:prettier/recommended',
|
||||
'prettier'
|
||||
)
|
||||
),
|
||||
{
|
||||
plugins: {
|
||||
'@typescript-eslint': fixupPluginRules(typescriptEslint),
|
||||
jest
|
||||
},
|
||||
|
||||
languageOptions: {
|
||||
globals: {
|
||||
...globals.node,
|
||||
...globals.jest
|
||||
},
|
||||
|
||||
parser: tsParser,
|
||||
ecmaVersion: 2021,
|
||||
sourceType: 'module'
|
||||
}
|
||||
}
|
||||
];
|
Reference in New Issue
Block a user