Skip to content

Commit

Permalink
fix: 修正在 webstorm 里导入二级目录报错的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudcome committed Jan 23, 2024
1 parent 26ff7fc commit d35e8a4
Show file tree
Hide file tree
Showing 7 changed files with 3,627 additions and 2,474 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ root = true
[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_size = 4
indent_style = space
max_line_length = 120
insert_final_newline = true
Expand Down
89 changes: 45 additions & 44 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,50 +5,51 @@ const { defineConfig } = require('eslint-define-config');
* @ref https://eslint.org/
*/
module.exports = defineConfig({
root: true,
root: true,

env: {
browser: true,
node: true,
es2022: true,
},

overrides: [
{
files: ['*.cjs'],
extends: [
//
'eslint:recommended',
],
rules: {
'prettier/prettier': 'error',
},
},
{
files: ['*.mjs'],
parserOptions: {
sourceType: 'module',
},
extends: [
//
'eslint:recommended',
],
rules: {
'prettier/prettier': 'error',
},
env: {
browser: true,
node: true,
es2022: true,
},
{
files: ['*.ts'],
parser: '@typescript-eslint/parser',
extends: [
//
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
],
rules: {
'prettier/prettier': 'error',
},
},
],

overrides: [
{
files: ['*.cjs'],
extends: [
//
'eslint:recommended',
],
rules: {
'prettier/prettier': 'error',
},
},
{
files: ['*.mjs'],
parserOptions: {
sourceType: 'module',
},
extends: [
//
'eslint:recommended',
],
rules: {
'prettier/prettier': 'error',
},
},
{
files: ['*.ts'],
parser: '@typescript-eslint/parser',
extends: [
//
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
],
rules: {
'prettier/prettier': 'error',
},
},
],
ignorePatterns: ['!.*rc.*'],
});
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
14
20
6 changes: 3 additions & 3 deletions .prettierrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* @type {import('prettier').Config}
*/
module.exports = {
tabWidth: 2,
singleQuote: true,
printWidth: 120,
tabWidth: 4,
singleQuote: true,
printWidth: 160,
};
Loading

0 comments on commit d35e8a4

Please sign in to comment.