Browse Source

chore(config): move sort-importer settings to vscode config file

feat/auto-update
jamaljsr 5 years ago
parent
commit
f8e59bc1ae
  1. 47
      .tsimportsorter
  2. 45
      .vscode/settings.json
  3. 4
      package.json

47
.tsimportsorter

@ -1,47 +0,0 @@
{
"importSorter.generalConfiguration.sortOnBeforeSave": true,
"importSorter.importStringConfiguration.tabSize": 2,
"importSorter.sortConfiguration.removeUnusedDefaultImports": true,
"importSorter.sortConfiguration.customOrderingRules.defaultNumberOfEmptyLinesAfterGroup": 0,
"importSorter.sortConfiguration.customOrderingRules.defaultOrderLevel": 50,
"importSorter.sortConfiguration.customOrderingRules.rules": [
{
"regex": "^(first entry ignored by the plugin. idk why)",
"orderLevel": 0
},
{
"regex": "^(react)",
"orderLevel": 10
},
{
"regex": "^(electron|path|fs)",
"orderLevel": 20
},
{
"regex": "^[@]",
"orderLevel": 30
},
{
"type": "importMember",
"regex": "^$",
"orderLevel": 40,
"disableSort": true
},
{
"regex": "^(i18n|lib|store|theme|types|util)",
"orderLevel": 60
},
{
"regex": "^(components|resources)",
"orderLevel": 70
},
{
"regex": "\\.less$",
"orderLevel": 90
},
{
"regex": "^[.]",
"orderLevel": 80
}
]
}

45
.vscode/settings.json

@ -17,5 +17,48 @@
{ "language": "typescript", "autoFix": true },
{ "language": "typescriptreact", "autoFix": true }
],
"importSorter.generalConfiguration.configurationFilePath": "./.tsimportsorter"
"importSorter.generalConfiguration.sortOnBeforeSave": true,
"importSorter.importStringConfiguration.tabSize": 2,
"importSorter.sortConfiguration.customOrderingRules.defaultNumberOfEmptyLinesAfterGroup": 0,
"importSorter.sortConfiguration.customOrderingRules.defaultOrderLevel": 50,
"importSorter.sortConfiguration.customOrderingRules.rules": [
{
"regex": "^(first entry ignored by the plugin. idk why)",
"orderLevel": 0
},
{
"regex": "^(react)",
"orderLevel": 10
},
{
"regex": "^(electron|path|fs)",
"orderLevel": 20
},
{
"regex": "^[@]",
"orderLevel": 30
},
{
"type": "importMember",
"regex": "^$",
"orderLevel": 40,
"disableSort": true
},
{
"regex": "^(i18n|lib|store|theme|types|util)",
"orderLevel": 60
},
{
"regex": "^(components|resources)",
"orderLevel": 70
},
{
"regex": "\\.less$",
"orderLevel": 90
},
{
"regex": "^[.]",
"orderLevel": 80
}
]
}

4
package.json

@ -30,8 +30,8 @@
"prebuild": "tsc -p electron/tsconfig.json",
"release": "standard-version --no-verify",
"start": "rescripts start",
"test": "cross-env DEBUG_PRINT_LIMIT=15000 rescripts test --coverage",
"test:ci": "cross-env CI=true yarn test",
"test": "cross-env DEBUG_PRINT_LIMIT=15000 rescripts test",
"test:ci": "cross-env CI=true yarn test --coverage",
"test:all": "yarn test:ci && yarn test:e2e",
"test:codecov": "codecov",
"test:e2e": "yarn build && cross-env NODE_ENV=production testcafe electron:./ ./e2e/**/*.e2e.ts",

Loading…
Cancel
Save