Skip to content

Commit ef2db23

Browse files
committed
Added dev tooling
1 parent cac9d32 commit ef2db23

8 files changed

+12315
-6
lines changed

.eslintignore

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
**/lwc/**/*.css
2+
**/lwc/**/*.html
3+
**/lwc/**/*.json
4+
**/lwc/**/*.svg
5+
**/lwc/**/*.xml
6+
.sfdx
7+
.vscode

.forceignore

+9-5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
1+
# Standard metadata
12
package.xml
2-
3-
AppSwitcher.appMenu
4-
3+
**appMenu
4+
**appSwitcher
5+
**objectTranslations
56
**profiles
7+
**settings
68

7-
src/main/default/settings
8-
9+
# LWC configuration files
910
**/jsconfig.json
1011
**/.eslintrc.json
12+
13+
# LWC Jest
14+
**/__tests__/**

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@
33
**/.eslintrc.json
44
**/jsconfig.json
55
.sfdx
6-
.vscode
6+
.vscode
7+
node_modules

.prettierignore

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# List files or directories below to ignore them when running prettier
2+
# More information: https://prettier.io/docs/en/ignore.html
3+
#
4+
5+
**/staticresources/**
6+
.sfdx
7+
.vscode

.prettierrc

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"trailingComma": "none",
3+
"singleQuote": true,
4+
"tabWidth": 4,
5+
"overrides": [
6+
{
7+
"files": "**/lwc/**/*.html",
8+
"options": { "parser": "lwc" }
9+
},
10+
{
11+
"files": "*.{cmp,page,component}",
12+
"options": { "parser": "html" }
13+
}
14+
]
15+
}

bin/check-version.js

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
const semver = require('semver');
2+
const pjson = require('../package.json');
3+
4+
const version = pjson.engines.node;
5+
if (!semver.satisfies(process.version, version)) {
6+
console.log(
7+
`\n\nRequired node version ${version} not satisfied with current version ${process.version}.\n\n`
8+
);
9+
process.exit(1);
10+
}

package-lock.json

+12,208
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
{
2+
"name": "sfdx-quiz",
3+
"version": "1.0.0",
4+
"private": true,
5+
"description": "Lightning Web Component Quiz App on a Salesforce Org",
6+
"engines": {
7+
"node": ">= 10.13.0",
8+
"npm": ">= 6.5.0"
9+
},
10+
"scripts": {
11+
"lint": "npm run lint:lwc && npm run lint:aura",
12+
"lint:lwc": "eslint **/lwc/**",
13+
"lint:aura": "sfdx force:lightning:lint **/aura/** --exit",
14+
"test": "npm run lint && npm run test:unit",
15+
"test:unit": "lwc-jest",
16+
"test:unit:watch": "lwc-jest --watch",
17+
"test:unit:debug": "lwc-jest --debug",
18+
"prettier": "prettier --write '**/*.{cmp,component,css,html,js,json,md,page,yaml,yml}'",
19+
"prettier:verify": "prettier --list-different '**/*.{cmp,component,css,html,js,json,md,page,yaml,yml}'",
20+
"postinstall": "node bin/check-version.js"
21+
},
22+
"devDependencies": {
23+
"@salesforce/eslint-config-lwc": "^0.3.0",
24+
"@salesforce/lwc-jest": "^0.4.14",
25+
"eslint": "^5.16.0",
26+
"husky": "^1.3.1",
27+
"lint-staged": "^8.2.1",
28+
"prettier": "github:prettier/prettier",
29+
"semver": "^5.7.1"
30+
},
31+
"husky": {
32+
"hooks": {
33+
"pre-commit": "lint-staged && npm run lint:aura"
34+
}
35+
},
36+
"lint-staged": {
37+
"**/*.{cmp,component,css,html,js,json,md,page,yaml,yml}": [
38+
"prettier --write"
39+
],
40+
"**/lwc/**": [
41+
"eslint"
42+
],
43+
"*": [
44+
"git add"
45+
]
46+
},
47+
"repository": {
48+
"type": "git",
49+
"url": "git+https://github.com/pozil/quiz-sfdx.git"
50+
},
51+
"author": "salesforce.com",
52+
"license": "CC0-1.0",
53+
"bugs": {
54+
"url": "https://github.com/pozil/quiz-sfdx/issues"
55+
},
56+
"homepage": "https://github.com/pozil/quiz-sfdx#readme"
57+
}

0 commit comments

Comments
 (0)