forked from openequella/openEQUELLA
-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.json
151 lines (151 loc) · 4.85 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
{
"name": "openequella",
"private": true,
"scripts": {
"postinstall": "cross-env-shell \"./coursier bootstrap com.geirsson:scalafmt-cli_2.12:1.5.1 -f -o node_modules/.bin/scalafmt && ./coursier bootstrap com.google.googlejavaformat:google-java-format:1.7 -f -o node_modules/.bin/google-java-format\"",
"format:scala": "find . -name \"*.scala\" -o -name \"*.sbt\" | xargs scalafmt",
"format:java": "find . -name \"*.java\" | xargs google-java-format -r",
"format:scss": "prettier --write ${npm_package_config_stylesheet_glob}",
"format:ts": "eslint --fix ${npm_package_config_typescript_glob}",
"check:scala": "find . -name '*.scala' -o -name '*.sbt' | xargs scalafmt --test",
"check:java": "find . -name '*.java' | xargs google-java-format -n --set-exit-if-changed",
"check:license": "cd react-front-end && licensee --production --errors-only && cd -",
"check:md": "remark -q --ignore-pattern NOTICE.md .",
"check:scss": "prettier --check ${npm_package_config_stylesheet_glob}",
"check:ts": "eslint ${npm_package_config_typescript_glob}",
"check:ts-types-source": "tsc --noEmit --project react-front-end/tsconfig.json",
"check:ts-types-autotest": "tsc --noEmit --project \"autotest/IntegTester/ps/tsconfig.json\"",
"check": "run-s check:*",
"format": "run-s format:*",
"prepare": "husky install"
},
"config": {
"stylesheet_glob": "Source/Plugins/Core/com.equella.core/{js,resources}/**/*.{css,scss}",
"typescript_glob": "{react-front-end,Source/Plugins/Core/com.equella.core/test/javascript}/**/*.{js,ts,tsx}"
},
"devDependencies": {
"@commitlint/cli": "17.1.2",
"@commitlint/config-conventional": "17.1.0",
"@typescript-eslint/eslint-plugin": "5.31.0",
"@typescript-eslint/parser": "5.31.0",
"babel-eslint": "10.1.0",
"cross-env": "7.0.3",
"eslint": "8.23.0",
"eslint-config-prettier": "8.5.0",
"eslint-config-react-app": "7.0.1",
"eslint-plugin-flowtype": "8.0.3",
"eslint-plugin-import": "2.26.0",
"eslint-plugin-jest": "26.6.0",
"eslint-plugin-jsx-a11y": "6.6.1",
"eslint-plugin-notice": "0.9.10",
"eslint-plugin-prettier": "4.2.1",
"eslint-plugin-react": "7.31.1",
"eslint-plugin-react-hooks": "4.6.0",
"husky": "8.0.1",
"licensee": "8.2.0",
"lint-staged": "13.0.3",
"npm-run-all": "4.1.5",
"prettier": "2.7.1",
"remark-cli": "11.0.0",
"remark-lint-no-dead-urls": "1.1.0",
"remark-validate-links": "12.0.0",
"typescript": "4.7.4"
},
"commitlint": {
"extends": [
"@commitlint/config-conventional"
]
},
"lint-staged": {
"*.{js,ts,tsx}": "eslint --fix",
"*.{css,scss}": "prettier --write",
"*.java": "google-java-format --replace",
"*.{scala,sbt}": "scalafmt"
},
"remarkConfig": {
"plugins": [
"remark-validate-links",
[
"remark-lint-no-dead-urls",
{
"skipLocalhost": true
}
]
]
},
"eslintConfig": {
"root": true,
"extends": [
"eslint:recommended",
"react-app",
"plugin:jest/recommended",
"plugin:jest/style",
"plugin:prettier/recommended"
],
"plugins": [
"notice"
],
"env": {
"jquery": true
},
"rules": {
"jest/consistent-test-it": "error",
"jest/no-mocks-import": "off",
"jest/require-top-level-describe": "error",
"jest/expect-expect": [
"warn",
{
"assertFunctionNames": [
"expect*"
]
}
],
"notice/notice": [
"error",
{
"templateFile": "licenseHeader.js"
}
],
"react/jsx-boolean-value": "error",
"react/jsx-curly-brace-presence": "error",
"react/jsx-fragments": "error",
"react/jsx-no-useless-fragment": "error",
"react/prefer-stateless-function": "error",
"react-hooks/exhaustive-deps": "error"
},
"settings": {
"jest": {
"version": 27
},
"react": {
"version": "17.0"
}
},
"overrides": [
{
"files": [
"react-front-end/tsrc/**/*.{ts,tsx}",
"react-front-end/__test__/**/*.{ts,tsx}",
"react-front-end/__stories__/**/*.{ts,tsx}",
"react-front-end/__mocks__/**/*.{ts,tsx}"
],
"parserOptions": {
"project": "react-front-end/tsconfig.json"
},
"rules": {
"no-var": "error",
"prefer-const": "error",
"@typescript-eslint/consistent-type-definitions": [
"error",
"interface"
],
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/no-inferrable-types": "error",
"@typescript-eslint/no-non-null-assertion": "error",
"@typescript-eslint/no-unnecessary-type-assertion": "error",
"@typescript-eslint/prefer-optional-chain": "error"
}
}
]
}
}