mirror of
https://github.com/actions/setup-python.git
synced 2026-03-20 08:00:19 +08:00
chore: migrate tooling configs to ESM format
This commit is contained in:
parent
a309ff8b42
commit
f9978130a7
8 changed files with 1989 additions and 1664 deletions
59
eslint.config.mjs
Normal file
59
eslint.config.mjs
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
// This is a reusable configuration file copied from https://github.com/actions/reusable-workflows/tree/main/reusable-configurations. Please don't make changes to this file as it's the subject of an automatic update.
|
||||
import js from '@eslint/js';
|
||||
import tseslint from 'typescript-eslint';
|
||||
import jest from 'eslint-plugin-jest';
|
||||
import prettier from 'eslint-config-prettier';
|
||||
|
||||
export default tseslint.config(
|
||||
js.configs.recommended,
|
||||
...tseslint.configs.recommended,
|
||||
prettier,
|
||||
{
|
||||
ignores: ['node_modules/**', 'dist/**', 'lib/**', 'coverage/**']
|
||||
},
|
||||
{
|
||||
files: ['**/*.ts'],
|
||||
languageOptions: {
|
||||
ecmaVersion: 2022,
|
||||
sourceType: 'module'
|
||||
},
|
||||
rules: {
|
||||
'@typescript-eslint/no-require-imports': 'error',
|
||||
'@typescript-eslint/no-non-null-assertion': 'off',
|
||||
'@typescript-eslint/no-explicit-any': 'off',
|
||||
'@typescript-eslint/no-empty-function': 'off',
|
||||
'@typescript-eslint/ban-ts-comment': [
|
||||
'error',
|
||||
{
|
||||
'ts-ignore': 'allow-with-description'
|
||||
}
|
||||
],
|
||||
'no-console': 'error',
|
||||
'yoda': 'error',
|
||||
'prefer-const': [
|
||||
'error',
|
||||
{
|
||||
destructuring: 'all'
|
||||
}
|
||||
],
|
||||
'no-control-regex': 'off',
|
||||
'no-constant-condition': ['error', {checkLoops: false}]
|
||||
}
|
||||
},
|
||||
{
|
||||
files: ['**/*.test.ts', '**/*.spec.ts'],
|
||||
plugins: {
|
||||
jest
|
||||
},
|
||||
languageOptions: {
|
||||
globals: jest.environments.globals.globals
|
||||
},
|
||||
rules: {
|
||||
...jest.configs.recommended.rules,
|
||||
'@typescript-eslint/no-unused-vars': 'off',
|
||||
'jest/no-standalone-expect': 'off',
|
||||
'jest/no-conditional-expect': 'off',
|
||||
'no-console': 'off'
|
||||
}
|
||||
}
|
||||
);
|
||||
Loading…
Add table
Add a link
Reference in a new issue