Skip to content

Commit 92b8872

Browse files
committed
chore: project update
1 parent 6219151 commit 92b8872

File tree

7 files changed

+37
-10800
lines changed

7 files changed

+37
-10800
lines changed

.eslintrc.js

Lines changed: 25 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
module.exports = {
2-
env: {
3-
browser: true
4-
},
2+
extends: ['plugin:prettier/recommended'],
3+
plugins: ['prettier', '@typescript-eslint'],
54
parser: '@typescript-eslint/parser',
65
parserOptions: {
76
createDefaultProgram: true,
8-
project: 'tsconfig.json',
9-
sourceType: 'module'
7+
project: './tsconfig.json',
108
},
11-
plugins: ['@typescript-eslint'],
129
rules: {
10+
'prettier/prettier': 'warn',
1311
'@typescript-eslint/adjacent-overload-signatures': 'error',
1412
'@typescript-eslint/array-type': 'error',
1513
'@typescript-eslint/await-thenable': 'error',
@@ -20,22 +18,10 @@ module.exports = {
2018
'@typescript-eslint/explicit-member-accessibility': [
2119
'off',
2220
{
23-
accessibility: 'explicit'
24-
}
25-
],
26-
'@typescript-eslint/indent': [
27-
'error',
28-
4,
29-
{
30-
FunctionDeclaration: {
31-
parameters: 'first'
32-
},
33-
FunctionExpression: {
34-
parameters: 'first'
35-
},
36-
SwitchCase:1
37-
}
21+
accessibility: 'explicit',
22+
},
3823
],
24+
3925
'@typescript-eslint/interface-name-prefix': 'off',
4026
'@typescript-eslint/member-delimiter-style': 'error',
4127
'@typescript-eslint/member-ordering': 'off',
@@ -59,8 +45,8 @@ module.exports = {
5945
'error',
6046
'single',
6147
{
62-
avoidEscape: true
63-
}
48+
avoidEscape: true,
49+
},
6450
],
6551
'@typescript-eslint/semi': ['error'],
6652
'@typescript-eslint/space-within-parens': ['off', 'never'],
@@ -86,19 +72,17 @@ module.exports = {
8672
ignoreCase: false,
8773
ignoreDeclarationSort: true,
8874
ignoreMemberSort: false,
89-
memberSyntaxSortOrder: ['none', 'all', 'multiple', 'single']
90-
}
75+
memberSyntaxSortOrder: ['none', 'all', 'multiple', 'single'],
76+
},
9177
],
9278
'linebreak-style': 'off',
9379
'max-classes-per-file': 'off',
9480
'max-len': [
95-
1,
81+
'off',
9682
{
97-
// ignorePattern: '^import |^export {(.*?)}',
98-
code: 130,
99-
'ignoreRegExpLiterals': true,
100-
'ignoreComments': true
101-
}
83+
ignorePattern: '^import |^export {(.*?)}',
84+
code: 200,
85+
},
10286
],
10387
'new-parens': 'off',
10488
'newline-per-chained-call': 'off',
@@ -128,9 +112,9 @@ module.exports = {
128112
'profile',
129113
'profileEnd',
130114
'timeStamp',
131-
'context'
132-
]
133-
}
115+
'context',
116+
],
117+
},
134118
],
135119
'no-constant-condition': 'error',
136120
'no-control-regex': 'off',
@@ -145,14 +129,14 @@ module.exports = {
145129
'no-irregular-whitespace': 'off',
146130
'no-multiple-empty-lines': 'off',
147131
'no-new-wrappers': 'error',
148-
'no-redeclare': 'error',
132+
'no-redeclare': ['error', { builtinGlobals: false }],
149133
'no-regex-spaces': 'error',
150134
'no-return-await': 'error',
151135
'no-shadow': [
152136
'off',
153137
{
154-
hoist: 'all'
155-
}
138+
hoist: 'all',
139+
},
156140
],
157141
'no-throw-literal': 'error',
158142
'no-trailing-spaces': 'error',
@@ -163,8 +147,8 @@ module.exports = {
163147
'error',
164148
{
165149
allowTaggedTemplates: true,
166-
allowShortCircuit: true
167-
}
150+
allowShortCircuit: true,
151+
},
168152
],
169153
'no-unused-labels': 'error',
170154
'no-var': 'error',
@@ -176,6 +160,6 @@ module.exports = {
176160
radix: 'error',
177161
'space-before-function-paren': 'off',
178162
'use-isnan': 'error',
179-
'valid-typeof': 'off'
180-
}
163+
'valid-typeof': 'off',
164+
},
181165
};

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,4 @@ Pods
2222
/plugin/README.md
2323
plugin/**/*js.map
2424
plugin/**/*js
25+
pnpm-lock.yaml

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"tsc": "cp src/webview.d.ts plugin && tsc -skipLibCheck -d",
77
"build": " \\cp README.md plugin/ && rm -f .tsbuildinfo && npm run tsc",
88
"build.angular": "ng-packagr -p ./src/angular/package.json -c ./src/angular/tsconfig.json",
9-
"publish": "npm run setup && npm run build && npm run build.angular && lerna publish",
9+
"publish": "npm run setup && npm run build && npm run build.angular && lerna publish --create-release=github",
1010
"commitmsg": "commitlint -e $GIT_PARAMS",
1111
"demo.ios": "npm i && npm run tsc && cd demo && tns run ios",
1212
"demo.android": "npm i && npm run tsc && cd demo && tns run android",
@@ -38,11 +38,14 @@
3838
"@typescript-eslint/eslint-plugin": "4.0.1",
3939
"@typescript-eslint/parser": "4.0.1",
4040
"eslint": "7.8.1",
41+
"eslint-config-prettier": "^6.15.0",
42+
"eslint-plugin-prettier": "^3.1.4",
4143
"husky": "^4.2.5",
4244
"lerna": "^3.22.1",
4345
"nativescript-vue": "^2.8.1",
4446
"ng-packagr": "~10.1.0",
4547
"npm-watch": "^0.7.0",
48+
"prettier": "^2.1.2",
4649
"prompt": "^1.0.0",
4750
"rimraf": "^3.0.2",
4851
"rxjs": "6.6.2",
@@ -70,4 +73,4 @@
7073
"dependencies": {
7174
"ts-node": "^9.0.0"
7275
}
73-
}
76+
}

plugin/.npmignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,6 @@ hooks/
66
*.old
77
tsconfig.json
88
!*.d.ts
9-
.smooth-releaserc
9+
.smooth-releaserc
10+
*.aar
11+
*.jar

0 commit comments

Comments
 (0)