Setup ESLint and Prettier and apply changes to sources #891
2 changed files with 14 additions and 8 deletions
12
.lintstagedrc
Normal file
12
.lintstagedrc
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
"linters": {
|
||||||
|
"src/**/*.{js,jsx,scss,json}": [
|
||||||
|
"prettier --write",
|
||||||
|
"git add"
|
||||||
|
],
|
||||||
|
"src/**/*.{js,jsx}": [
|
||||||
|
"eslint --fix",
|
||||||
|
"git add"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
10
package.json
10
package.json
|
@ -22,8 +22,8 @@
|
||||||
"build": "yarn compile && electron-builder build",
|
"build": "yarn compile && electron-builder build",
|
||||||
"postinstall": "electron-builder install-app-deps",
|
"postinstall": "electron-builder install-app-deps",
|
||||||
"precommit": "lint-staged",
|
"precommit": "lint-staged",
|
||||||
"lint": "eslint src/",
|
"lint": "eslint src/**/*.{js,jsx} --fix",
|
||||||
"pretty": "prettier src/ --write"
|
"pretty": "prettier src/**/*.{js,jsx,scss,json} --write"
|
||||||
},
|
},
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"lbry"
|
"lbry"
|
||||||
|
@ -108,12 +108,6 @@
|
||||||
"yarn": "^1.3"
|
"yarn": "^1.3"
|
||||||
},
|
},
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"lint-staged": {
|
|
||||||
"src/**/*.{js,jsx}": [
|
|
||||||
"prettier --write",
|
|
||||||
"git add"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"lbrySettings": {
|
"lbrySettings": {
|
||||||
"lbrynetDaemonVersion": "0.18.0",
|
"lbrynetDaemonVersion": "0.18.0",
|
||||||
"lbrynetDaemonUrlTemplate": "https://github.com/lbryio/lbry/releases/download/vDAEMONVER/lbrynet-daemon-vDAEMONVER-OSNAME.zip"
|
"lbrynetDaemonUrlTemplate": "https://github.com/lbryio/lbry/releases/download/vDAEMONVER/lbrynet-daemon-vDAEMONVER-OSNAME.zip"
|
||||||
|
|
Loading…
Reference in a new issue