Skip to content

Commit 06ba92a

Browse files
authored
chore: update lint staged (#53)
* update lint staged to run all scripts * add param --passWithNoTests * fix prettier * update lint staged and remote it from package * remove from ignore config files * update lint script and add .eslintignore * remove confg file from script
1 parent 958a46b commit 06ba92a

File tree

4 files changed

+11
-6
lines changed

4 files changed

+11
-6
lines changed

Diff for: .eslintignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.cache
2+
dist

Diff for: .lintstagedrc.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
module.exports = {
2-
'**/*.js': (files) => [`eslint --quiet --fix ${files.join(' ')}`],
3-
'**/*.md': (files) => [`prettier --write ${files.join(' ')}`],
4-
}
2+
'**/*.js': (files) => [`eslint --quiet --fix ${files.join(' ')}`,`jest --passWithNoTests`],
3+
'**/*.{md,js}': (files) => [`prettier --write ${files.join(' ')}`],
4+
};

Diff for: .prettierignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.cache
2+
dist

Diff for: package.json

+4-3
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,13 @@
1212
"postbuild:client": "mkdir -p dist/client/public && cp _redirects dist/client/_redirects && cp public/favicon.ico dist/client/favicon.ico && cp public/android-chrome-512x512.png dist/client/public/icon.png && cp -r .well-known dist/client/.well-known",
1313
"build:server": "cp -r src/lambda/ dist/server",
1414
"postbuild:server": "mkdir -p dist/server/server && mv dist/client/index.html dist/server/server/",
15-
"lint": "eslint 'src/**/*.js' --quiet --fix",
15+
"lint": "eslint . --quiet --fix",
1616
"clean": "rimraf ./dist ./.cache",
17-
"ci:lint": "eslint 'src/**/*.js' -c ./.eslintrc.js",
17+
"ci:lint": "eslint .",
1818
"ci:test": "jest --ci",
1919
"test": "jest",
20-
"test:watch": "jest --watch"
20+
"test:watch": "jest --watch",
21+
"prettier": "prettier . --write"
2122
},
2223
"dependencies": {
2324
"codemirror": "5.54.0",

0 commit comments

Comments
 (0)