Skip to content

Commit

Permalink
feat: updates developer tools (#12)
Browse files Browse the repository at this point in the history
feat: adds updated config files
  • Loading branch information
martines3000 authored Aug 16, 2022
1 parent 2333990 commit 8174f53
Show file tree
Hide file tree
Showing 10 changed files with 1,044 additions and 43 deletions.
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false
9 changes: 2 additions & 7 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
module.exports = {
root: true,
extends: [
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
Expand All @@ -7,7 +8,7 @@ module.exports = {
],
parser: "@typescript-eslint/parser",
parserOptions: {
project: ["./tsconfig.eslint.json"],
project: "./tsconfig.eslint.json",
},
rules: {
"@typescript-eslint/no-misused-promises": [
Expand All @@ -17,12 +18,6 @@ module.exports = {
},
],
"@typescript-eslint/no-unsafe-member-access": "off",
"prettier/prettier": [
"error",
{
endOfLine: "auto",
},
],
"@typescript-eslint/no-unsafe-call": "off",
"@typescript-eslint/no-unsafe-assignment": "off",
},
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@ yarn-error.log*
.vscode/settings.json

tsconfig.tsbuildinfo
package-lock.json
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

yarn commitlint --edit $1
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

yarn lint-staged
5 changes: 5 additions & 0 deletions .lintstagedrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
"*.{js,ts}": ["eslint --fix"],
"*.{md,json,yml,yaml}": ["prettier --write"],
"*.{ts}": () => "tsc -p tsconfig.json --noEmit --incremental false",
};
1 change: 1 addition & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = { extends: ["@commitlint/config-conventional"] };
15 changes: 11 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,23 @@
"images"
],
"scripts": {
"build": "yarn run build:tsc && yarn run build:snap",
"audit": "audit-ci --moderate --skip-dev",
"build": "yarn build:tsc && yarn build:snap",
"build:snap": "yarn build:snap:bundle && yarn build:snap:postprocess && yarn build:snap:eval",
"build:snap:bundle": "mm-snap build -s build/index.js --verboseErrors --stripComments --eval false",
"build:snap:eval": "mm-snap eval -b dist/bundle.js",
"build:snap:postprocess": "node ./post-process.js && mm-snap manifest --fix",
"build:tsc": "tsc --build --pretty",
"clean": "rimraf 'dist/*'",
"clean": "rimraf dist build",
"prebuild": "yarn run clean",
"serve": "mm-snap serve",
"start": "mm-snap --version && yarn run build && yarn run serve",
"start": "mm-snap --version && yarn build && yarn serve",
"prettier": "prettier --write .",
"lint": "yarn lint:eslint && yarn lint:tsc && yarn lint:prettier",
"lint:eslint": "eslint . --ext .js,.ts,.tsx",
"lint:prettier": "prettier . --check",
"lint:tsc": "tsc --noEmit --incremental false"
"lint:tsc": "tsc --noEmit --incremental false",
"prepare": "yarn run clean && husky install"
},
"dependencies": {
"@babel/runtime": "^7.17.2",
Expand Down Expand Up @@ -76,17 +79,21 @@
"web-did-resolver": "^2.0.14"
},
"devDependencies": {
"@commitlint/cli": "^17.0.3",
"@commitlint/config-conventional": "^17.0.3",
"@metamask/providers": "^9.0.0",
"@metamask/snap-types": "^0.18.1",
"@metamask/snaps-cli": "^0.18.1",
"@types/node": "^17.0.18",
"@typescript-eslint/eslint-plugin": "^5.32.0",
"@typescript-eslint/parser": "^5.32.0",
"audit-ci": "^6.3.0",
"eslint": "^8.20.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-prettier": "^4.2.1",
"husky": "^8.0.1",
"lint-staged": "^13.0.3",
"precompress": "^7.0.1",
"prettier": "^2.7.1",
"rimraf": "^3.0.2",
Expand Down
2 changes: 1 addition & 1 deletion snap.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/blockchain-lab-um/ssi-snap.git"
},
"source": {
"shasum": "npRKAbqvGCtzSKiHX/a0Ge0tFAzS8LlRaJ8pYvuwAgs=",
"shasum": "EjOmxmSY430+Eaf6lcpU5HnCmw1ye/AbSF75TgXPLFA=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
Loading

0 comments on commit 8174f53

Please sign in to comment.