Skip to content

Commit 84d80e4

Browse files
committed
fix: lint
1 parent bbc5b7d commit 84d80e4

File tree

7 files changed

+9
-7
lines changed

7 files changed

+9
-7
lines changed

.eslintcache

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[{"/Users/xiaohuoni/Desktop/nextAlitaApp/src/app.ts":"1","/Users/xiaohuoni/Desktop/nextAlitaApp/src/models/index.ts":"2","/Users/xiaohuoni/Desktop/nextAlitaApp/src/models/list.ts":"3","/Users/xiaohuoni/Desktop/nextAlitaApp/src/models/settings.ts":"4","/Users/xiaohuoni/Desktop/nextAlitaApp/src/pages/index/index.tsx":"5","/Users/xiaohuoni/Desktop/nextAlitaApp/src/pages/list/index.tsx":"6","/Users/xiaohuoni/Desktop/nextAlitaApp/src/pages/settings/index.tsx":"7","/Users/xiaohuoni/Desktop/nextAlitaApp/src/services/api.ts":"8"},{"size":1733,"mtime":1585291240928,"results":"9","hashOfConfig":"10"},{"size":782,"mtime":1585291477786,"results":"11","hashOfConfig":"10"},{"size":773,"mtime":1584206431628,"results":"12","hashOfConfig":"10"},{"size":809,"mtime":1582711663307,"results":"13","hashOfConfig":"10"},{"size":850,"mtime":1585291272469,"results":"14","hashOfConfig":"10"},{"size":1341,"mtime":1585291262189,"results":"15","hashOfConfig":"10"},{"size":972,"mtime":1585291262190,"results":"16","hashOfConfig":"10"},{"size":217,"mtime":1580813832030,"results":"17","hashOfConfig":"10"},{"filePath":"18","messages":"19","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},"q0m86h",{"filePath":"20","messages":"21","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"22","messages":"23","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"24","messages":"25","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"26","messages":"27","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"28","messages":"29","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"30","messages":"31","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"32","messages":"33","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/Users/xiaohuoni/Desktop/nextAlitaApp/src/app.ts",["34"],"/Users/xiaohuoni/Desktop/nextAlitaApp/src/models/index.ts",["35"],"/Users/xiaohuoni/Desktop/nextAlitaApp/src/models/list.ts",["36"],"/Users/xiaohuoni/Desktop/nextAlitaApp/src/models/settings.ts",["37"],"/Users/xiaohuoni/Desktop/nextAlitaApp/src/pages/index/index.tsx",[],"/Users/xiaohuoni/Desktop/nextAlitaApp/src/pages/list/index.tsx",[],"/Users/xiaohuoni/Desktop/nextAlitaApp/src/pages/settings/index.tsx",["38"],"/Users/xiaohuoni/Desktop/nextAlitaApp/src/services/api.ts",[],{"ruleId":"39","severity":1,"message":"40","line":16,"column":5,"nodeType":"41","messageId":"42","endLine":16,"endColumn":16},{"ruleId":"39","severity":1,"message":"40","line":29,"column":7,"nodeType":"41","messageId":"42","endLine":29,"endColumn":18},{"ruleId":"39","severity":1,"message":"40","line":29,"column":7,"nodeType":"41","messageId":"42","endLine":29,"endColumn":18},{"ruleId":"39","severity":1,"message":"40","line":29,"column":7,"nodeType":"41","messageId":"42","endLine":29,"endColumn":18},{"ruleId":"39","severity":1,"message":"40","line":13,"column":5,"nodeType":"41","messageId":"42","endLine":13,"endColumn":16},"no-console","Unexpected console statement.","MemberExpression","unexpected"]

.eslintrc.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ module.exports = {
33
rules: {
44
'import/no-extraneous-dependencies': 0,
55
'jsx-a11y/alt-text': 0,
6+
'no-unused-expressions': 0,
67
},
78
globals: {},
89
};

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"lint-staged:js": "eslint --ext .js,.jsx,.ts,.tsx ",
2020
"lint:fix": "eslint --fix --cache --ext .js,.jsx,.ts,.tsx --format=pretty ./src && npm run lint:style",
2121
"lint:js": "eslint --cache --ext .js,.jsx,.ts,.tsx --format=pretty ./src",
22-
"lint:prettier": "check-prettier lint",
22+
"lint:prettier": "prettier --check \"**/*\" --end-of-line auto",
2323
"lint:style": "stylelint --fix \"src/**/*.less\" --syntax less",
2424
"prettier": "prettier -c --write \"**/*\""
2525
},
@@ -44,14 +44,14 @@
4444
},
4545
"devDependencies": {
4646
"@types/express": "^4.17.2",
47-
"@umijs/fabric": "2.0.0",
47+
"@umijs/fabric": "2.0.6",
4848
"chalk": "^3.0.0",
49-
"check-prettier": "^1.0.3",
5049
"cross-env": "^6.0.3",
5150
"eslint": "6.8.0",
5251
"eslint-plugin-eslint-comments": "^3.1.2",
5352
"express": "^4.17.1",
5453
"lint-staged": "^9.5.0",
54+
"prettier": "^2.0.2",
5555
"stylelint": "^12.0.1",
5656
"yorkie": "^2.0.0"
5757
}

scripts/verifyCommit.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22

33
const chalk = require('chalk');
44
const msgPath = process.env.GIT_PARAMS;
5-
const msg = require('fs')
6-
.readFileSync(msgPath, 'utf-8')
7-
.trim();
5+
const msg = require('fs').readFileSync(msgPath, 'utf-8').trim();
86

97
const commitRE = /^(revert: )?(feat|fix|docs|style|refactor|perf|test|workflow|build|ci|chore|types|wip|release|dep)(\(.+\))?: .{1,50}/;
108

src/models/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { Effect, Reducer } from 'alita';
22
import { query } from '@/services/api';
3+
34
export interface IndexModelState {
45
name: string;
56
}

src/pages/index/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ interface PageProps extends ConnectProps {
99
const IndexPage: FC<PageProps> = ({ index, dispatch }) => {
1010
// 这里发起了初始化请求
1111
useEffect(() => {
12-
dispatch!({
12+
dispatch?.({
1313
type: 'index/query',
1414
});
1515
return () => {

src/pages/settings/index.less

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
.center {
2+
font-size: 26px;
23
}

0 commit comments

Comments
 (0)