mirror of
https://github.com/vuejs/babel-plugin-jsx.git
synced 2024-11-15 08:19:16 +08:00
61 lines
1.4 KiB
JavaScript
61 lines
1.4 KiB
JavaScript
const { builtinModules } = require('node:module');
|
|
|
|
module.exports = {
|
|
root: true,
|
|
env: {
|
|
browser: true,
|
|
node: true,
|
|
es6: true,
|
|
},
|
|
|
|
extends: [
|
|
'eslint:recommended',
|
|
'plugin:@typescript-eslint/recommended',
|
|
'prettier',
|
|
],
|
|
plugins: ['import'],
|
|
parser: '@typescript-eslint/parser',
|
|
parserOptions: {
|
|
sourceType: 'module',
|
|
ecmaFeatures: {
|
|
jsx: true,
|
|
},
|
|
},
|
|
rules: {
|
|
eqeqeq: ['warn', 'always', { null: 'never' }],
|
|
'no-debugger': ['error'],
|
|
'no-empty': ['warn', { allowEmptyCatch: true }],
|
|
'prefer-const': [
|
|
'warn',
|
|
{
|
|
destructuring: 'all',
|
|
},
|
|
],
|
|
'@typescript-eslint/ban-ts-comment': 'off',
|
|
'@typescript-eslint/no-var-requires': 'off',
|
|
'@typescript-eslint/no-non-null-assertion': 'off',
|
|
'@typescript-eslint/no-explicit-any': 'off',
|
|
'@typescript-eslint/consistent-type-imports': [
|
|
'error',
|
|
{ prefer: 'type-imports', fixStyle: 'inline-type-imports' },
|
|
],
|
|
|
|
'import/no-nodejs-modules': [
|
|
'error',
|
|
{ allow: builtinModules.map((mod) => `node:${mod}`) },
|
|
],
|
|
'import/no-duplicates': 'error',
|
|
'import/order': 'error',
|
|
'sort-imports': [
|
|
'error',
|
|
{
|
|
ignoreCase: false,
|
|
ignoreDeclarationSort: true,
|
|
ignoreMemberSort: false,
|
|
memberSyntaxSortOrder: ['none', 'all', 'multiple', 'single'],
|
|
allowSeparatedGroups: false,
|
|
},
|
|
],
|
|
},
|
|
};
|