Skip to content

Commit 8fe1f95

Browse files
committed
prettier
1 parent 7cd0167 commit 8fe1f95

File tree

22 files changed

+239
-237
lines changed

22 files changed

+239
-237
lines changed

.eslintrc.json

Lines changed: 25 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,26 @@
11
{
2-
"env": {
3-
"browser": false,
4-
"commonjs": true,
5-
"es6": true,
6-
"node": true,
7-
"mocha": true
8-
},
9-
"parserOptions": {
10-
"ecmaVersion": 2018,
11-
"ecmaFeatures": {
12-
"jsx": true
13-
},
14-
"sourceType": "module"
15-
},
16-
"ignorePatterns": [
17-
"lib",
18-
"app",
19-
"out"
20-
],
21-
"rules": {
22-
"no-const-assign": "warn",
23-
"no-this-before-super": "warn",
24-
"no-undef": "error",
25-
"no-unreachable": "warn",
26-
"no-unused-vars": "error",
27-
"constructor-super": "warn",
28-
"valid-typeof": "warn"
29-
}
30-
}
2+
"env": {
3+
"browser": false,
4+
"commonjs": true,
5+
"es6": true,
6+
"node": true,
7+
"mocha": true
8+
},
9+
"parserOptions": {
10+
"ecmaVersion": 2018,
11+
"ecmaFeatures": {
12+
"jsx": true
13+
},
14+
"sourceType": "module"
15+
},
16+
"ignorePatterns": ["lib", "app", "out"],
17+
"rules": {
18+
"no-const-assign": "warn",
19+
"no-this-before-super": "warn",
20+
"no-undef": "error",
21+
"no-unreachable": "warn",
22+
"no-unused-vars": "error",
23+
"constructor-super": "warn",
24+
"valid-typeof": "warn"
25+
}
26+
}

.prettierignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
node_modules
2+
build
3+
out

.prettierrc.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
module.exports = {
2+
printWidth: 90,
3+
trailingComma: 'all',
4+
tabWidth: 2,
5+
semi: false,
6+
singleQuote: true,
7+
jsxSingleQuote: true,
8+
arrowParens: 'always',
9+
}

.vscode/extensions.json

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
{
2-
// See https://go.microsoft.com/fwlink/?LinkId=733558
3-
// for the documentation about the extensions.json format
4-
"recommendations": [
5-
"dbaeumer.vscode-eslint"
6-
]
7-
}
2+
// See https://go.microsoft.com/fwlink/?LinkId=733558
3+
// for the documentation about the extensions.json format
4+
"recommendations": ["dbaeumer.vscode-eslint"]
5+
}

.vscode/launch.json

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,25 @@
33
// Hover to view descriptions of existing attributes.
44
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
55
{
6-
"version": "0.2.0",
7-
"configurations": [
8-
{
9-
"name": "Run Extension",
10-
"type": "extensionHost",
11-
"request": "launch",
12-
"args": [
13-
"--extensionDevelopmentPath=${workspaceFolder}",
14-
"${workspaceFolder}/test/app"
15-
]
16-
},
17-
{
18-
"name": "Extension Tests",
19-
"type": "extensionHost",
20-
"request": "launch",
21-
"args": [
22-
"--extensionDevelopmentPath=${workspaceFolder}",
23-
"--extensionTestsPath=${workspaceFolder}/test/suite/index"
24-
]
25-
}
26-
]
27-
}
6+
"version": "0.2.0",
7+
"configurations": [
8+
{
9+
"name": "Run Extension",
10+
"type": "extensionHost",
11+
"request": "launch",
12+
"args": [
13+
"--extensionDevelopmentPath=${workspaceFolder}",
14+
"${workspaceFolder}/test/app"
15+
]
16+
},
17+
{
18+
"name": "Extension Tests",
19+
"type": "extensionHost",
20+
"request": "launch",
21+
"args": [
22+
"--extensionDevelopmentPath=${workspaceFolder}",
23+
"--extensionTestsPath=${workspaceFolder}/test/suite/index"
24+
]
25+
}
26+
]
27+
}

.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"quickComponentCreator.schemaFilePath": "test/app/qcc.schema.js",
33
"quickComponentCreator.prettierConfigFilePath": "test/app/.prettierrc.js"
4-
}
4+
}

jsconfig.json

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
{
2-
"compilerOptions": {
3-
"module": "commonjs",
4-
"target": "es6",
5-
"checkJs": false, /* Typecheck .js files. */
6-
"lib": [
7-
"es6"
8-
]
9-
},
10-
"exclude": [
11-
"node_modules"
12-
]
2+
"compilerOptions": {
3+
"module": "commonjs",
4+
"target": "es6",
5+
"checkJs": false /* Typecheck .js files. */,
6+
"lib": ["es6"]
7+
},
8+
"exclude": ["node_modules"]
139
}

package.json

Lines changed: 83 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -1,84 +1,85 @@
11
{
2-
"name": "quick-component-creator",
3-
"displayName": "Quick Component Creator",
4-
"description": "Quickly create React, Vue, Angular, Svelte components with your own templates",
5-
"publisher": "tenjojeremy",
6-
"version": "2.32.0",
7-
"engines": {
8-
"vscode": "^1.55.0"
9-
},
10-
"categories": [
11-
"Other"
12-
],
13-
"activationEvents": [
14-
"onCommand:quickComponentCreator.createComponent",
15-
"onCommand:quickComponentCreator.createComponentInFolder"
16-
],
17-
"main": "./out/index.js",
18-
"scripts": {
19-
"dev": "npm run -S build -- --sourcemap --watch",
20-
"build": "esbuild ./src/index.ts --bundle --outfile=out/index.js --external:vscode --format=cjs --platform=node",
21-
"lint": "eslint .",
22-
"pretest": "npm run lint",
23-
"test": "",
24-
"publish": "vsce publish minor",
25-
"vscode:prepublish": "npm run -S build -- --minify"
26-
},
27-
"icon": "assets/images/logo.png",
28-
"repository": {
29-
"type": "git",
30-
"url": "https://github.com/jeremytenjo/quick-component-creator"
31-
},
32-
"contributes": {
33-
"configuration": {
34-
"title": "Quick Component Creator",
35-
"properties": {
36-
"quickComponentCreator.schemaFilePath": {
37-
"type": "string",
38-
"default": "qcc.schema.js",
39-
"description": "Schema file path"
40-
},
41-
"quickComponentCreator.prettierConfigFilePath": {
42-
"type": "string",
43-
"default": ".prettierrc.js",
44-
"description": "Prettier config file path (Optional)"
45-
}
46-
}
47-
},
48-
"commands": [
49-
{
50-
"command": "quickComponentCreator.createComponent",
51-
"title": "Create Component"
52-
},
53-
{
54-
"command": "quickComponentCreator.createComponentInFolder",
55-
"title": "Create Component in folder"
56-
}
57-
],
58-
"menus": {
59-
"explorer/context": [
60-
{
61-
"when": "explorerResourceIsFolder",
62-
"command": "quickComponentCreator.createComponent",
63-
"group": "YourGroup@1"
64-
}
65-
]
66-
}
67-
},
68-
"dependencies": {
69-
"change-case": "^4.1.2",
70-
"prettier": "^2.3.0"
71-
},
72-
"devDependencies": {
73-
"@types/glob": "^7.1.3",
74-
"@types/mocha": "^8.0.4",
75-
"@types/node": "^12.11.7",
76-
"@types/vscode": "^1.55.0",
77-
"esbuild": "^0.12.3",
78-
"eslint": "^7.19.0",
79-
"glob": "^7.1.7",
80-
"mocha": "^8.2.1",
81-
"typescript": "^4.1.3",
82-
"vscode-test": "^1.5.0"
83-
}
2+
"name": "quick-component-creator",
3+
"displayName": "Quick Component Creator",
4+
"description": "Quickly create React, Vue, Angular, Svelte components with your own templates",
5+
"publisher": "tenjojeremy",
6+
"version": "2.32.0",
7+
"engines": {
8+
"vscode": "^1.55.0"
9+
},
10+
"categories": [
11+
"Other"
12+
],
13+
"activationEvents": [
14+
"onCommand:quickComponentCreator.createComponent",
15+
"onCommand:quickComponentCreator.createComponentInFolder"
16+
],
17+
"main": "./out/index.js",
18+
"scripts": {
19+
"dev": "npm run -S build -- --sourcemap --watch",
20+
"build": "esbuild ./src/index.ts --bundle --outfile=out/index.js --external:vscode --format=cjs --platform=node",
21+
"lint": "eslint .",
22+
"pretest": "npm run lint",
23+
"prettify": "prettier --write '{**/*,*}.{js,jsx,json}'",
24+
"test": "",
25+
"publish": "vsce publish minor",
26+
"vscode:prepublish": "npm run -S build -- --minify"
27+
},
28+
"icon": "assets/images/logo.png",
29+
"repository": {
30+
"type": "git",
31+
"url": "https://github.com/jeremytenjo/quick-component-creator"
32+
},
33+
"contributes": {
34+
"configuration": {
35+
"title": "Quick Component Creator",
36+
"properties": {
37+
"quickComponentCreator.schemaFilePath": {
38+
"type": "string",
39+
"default": "qcc.schema.js",
40+
"description": "Schema file path"
41+
},
42+
"quickComponentCreator.prettierConfigFilePath": {
43+
"type": "string",
44+
"default": ".prettierrc.js",
45+
"description": "Prettier config file path (Optional)"
46+
}
47+
}
48+
},
49+
"commands": [
50+
{
51+
"command": "quickComponentCreator.createComponent",
52+
"title": "Create Component"
53+
},
54+
{
55+
"command": "quickComponentCreator.createComponentInFolder",
56+
"title": "Create Component in folder"
57+
}
58+
],
59+
"menus": {
60+
"explorer/context": [
61+
{
62+
"when": "explorerResourceIsFolder",
63+
"command": "quickComponentCreator.createComponent",
64+
"group": "YourGroup@1"
65+
}
66+
]
67+
}
68+
},
69+
"dependencies": {
70+
"change-case": "^4.1.2",
71+
"prettier": "^2.3.0"
72+
},
73+
"devDependencies": {
74+
"@types/glob": "^7.1.3",
75+
"@types/mocha": "^8.0.4",
76+
"@types/node": "^12.11.7",
77+
"@types/vscode": "^1.55.0",
78+
"esbuild": "^0.12.3",
79+
"eslint": "^7.19.0",
80+
"glob": "^7.1.7",
81+
"mocha": "^8.2.1",
82+
"typescript": "^4.1.3",
83+
"vscode-test": "^1.5.0"
84+
}
8485
}
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
const createComponent = require("../../common/createComponent");
2-
const logError = require("../../../utils/log/logError");
3-
const getActiveFileFolderPath = require("../../../utils/folderFiles/getActiveFileFolderPath");
1+
const createComponent = require('../../common/createComponent')
2+
const logError = require('../../../utils/log/logError')
3+
const getActiveFileFolderPath = require('../../../utils/folderFiles/getActiveFileFolderPath')
44

55
module.exports = async function createComponentCommand(
6-
{ path: componentOutputPath } = { path: getActiveFileFolderPath() }
6+
{ path: componentOutputPath } = { path: getActiveFileFolderPath() },
77
) {
88
try {
9-
await createComponent({ outputPath: componentOutputPath });
9+
await createComponent({ outputPath: componentOutputPath })
1010
} catch (error) {
11-
logError(error);
11+
logError(error)
1212
}
13-
};
13+
}

src/commands/createComponentInFolder/handlers/genFolderSelectionList.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,8 @@ module.exports = async function genFolderSelectionList() {
1010
label:
1111
wsFile.replace(workspacePath, '') === '/'
1212
? '/'
13-
: removeFirstCharacter(
14-
removeLastCharacter(wsFile.replace(workspacePath, ''))
15-
),
16-
path: wsFile
13+
: removeFirstCharacter(removeLastCharacter(wsFile.replace(workspacePath, ''))),
14+
path: wsFile,
1715
}))
1816

1917
return folderSelectionList

0 commit comments

Comments
 (0)