Skip to content

Commit 8e1f67a

Browse files
author
boquanfu
committed
refactor: use glass-easel as test basis
1 parent dc2d5b3 commit 8e1f67a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+9460
-14215
lines changed

.eslintrc.js

+16-14
Original file line numberDiff line numberDiff line change
@@ -2,38 +2,40 @@ module.exports = {
22
root: true,
33
parser: '@typescript-eslint/parser',
44
parserOptions: {
5-
ecmaVersion: 6,
5+
ecmaVersion: 9,
6+
ecmaFeatures: {
7+
jsx: false,
8+
},
69
sourceType: 'module',
710
},
811
env: {
912
es6: true,
10-
browser: true,
13+
node: true,
1114
jest: true,
1215
commonjs: true,
13-
node: true,
1416
},
15-
plugins: ['@typescript-eslint'],
16-
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended'],
1717
globals: {
18-
wx: true,
18+
window: true,
19+
document: true,
1920
App: true,
2021
Page: true,
2122
Component: true,
2223
Behavior: true,
24+
wx: true,
2325
},
26+
plugins: ['@typescript-eslint', 'prettier'],
27+
extends: [
28+
'eslint:recommended',
29+
'plugin:@typescript-eslint/eslint-recommended',
30+
'plugin:@typescript-eslint/recommended',
31+
'prettier/@typescript-eslint',
32+
],
2433
rules: {
25-
'no-console': 0,
34+
'prettier/prettier': 'error',
2635
'@typescript-eslint/ban-ts-ignore': 'off',
2736
'@typescript-eslint/no-empty-function': 'off',
2837
'@typescript-eslint/explicit-function-return-type': 'off',
2938
'@typescript-eslint/no-explicit-any': 'off',
3039
'@typescript-eslint/no-non-null-assertion': 'off',
31-
indent: ['error', 2, { SwitchCase: 1 }],
32-
'comma-spacing': 'error',
33-
semi: ['error', 'never'],
34-
quotes: ['error', 'single'],
35-
'object-curly-spacing': ['error', 'always'],
36-
'@typescript-eslint/ban-ts-comment': 'off',
37-
"@typescript-eslint/interface-name-prefix": 'off'
3840
},
3941
}

.github/workflows/node.js.yml

+11-12
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,12 @@ name: Node.js CI
55

66
on:
77
push:
8-
branches: [ "master" ]
8+
branches: ['master']
99
pull_request:
10-
branches: [ "master" ]
10+
branches: ['master']
1111

1212
jobs:
1313
build:
14-
1514
runs-on: ubuntu-latest
1615

1716
strategy:
@@ -20,12 +19,12 @@ jobs:
2019
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
2120

2221
steps:
23-
- uses: actions/checkout@v3
24-
- name: Use Node.js ${{ matrix.node-version }}
25-
uses: actions/setup-node@v3
26-
with:
27-
node-version: ${{ matrix.node-version }}
28-
cache: 'npm'
29-
- run: npm i
30-
- run: npm run build --if-present
31-
- run: npm test
22+
- uses: actions/checkout@v3
23+
- name: Use Node.js ${{ matrix.node-version }}
24+
uses: actions/setup-node@v3
25+
with:
26+
node-version: ${{ matrix.node-version }}
27+
cache: 'npm'
28+
- run: npm i
29+
- run: npm run build --if-present
30+
- run: npm test

.prettierrc.js

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
module.exports = {
2+
printWidth: 100,
3+
tabWidth: 2,
4+
useTabs: false,
5+
semi: false,
6+
singleQuote: true,
7+
quoteProps: 'as-needed',
8+
trailingComma: 'all',
9+
bracketSpacing: true,
10+
arrowParens: 'always',
11+
requirePragma: false,
12+
insertPragma: false,
13+
proseWrap: 'preserve',
14+
endOfLine: 'lf',
15+
embeddedLanguageFormatting: 'auto',
16+
}

.swcrc

+26-26
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
11
{
2-
"jsc": {
3-
"parser": {
4-
"syntax": "typescript",
5-
"tsx": false,
6-
"decorators": false,
7-
"dynamicImport": false
8-
},
9-
"transform": null,
10-
"target": "es5",
11-
"loose": true,
12-
"externalHelpers": false,
13-
"keepClassNames": false,
14-
"minify": {
15-
"compress": {
16-
"unused": true
17-
},
18-
"mangle": true
19-
}
2+
"jsc": {
3+
"parser": {
4+
"syntax": "typescript",
5+
"tsx": false,
6+
"decorators": false,
7+
"dynamicImport": false
208
},
21-
"minify": true,
22-
"module": {
23-
"type": "commonjs",
24-
"strict": false,
25-
"strictMode": true,
26-
"lazy": false,
27-
"noInterop": false
9+
"transform": null,
10+
"target": "es5",
11+
"loose": true,
12+
"externalHelpers": false,
13+
"keepClassNames": false,
14+
"minify": {
15+
"compress": {
16+
"unused": true
17+
},
18+
"mangle": true
2819
}
29-
}
20+
},
21+
"minify": true,
22+
"module": {
23+
"type": "commonjs",
24+
"strict": false,
25+
"strictMode": true,
26+
"lazy": false,
27+
"noInterop": false
28+
}
29+
}

demo/app.js

-3
This file was deleted.

demo/app.json

-10
This file was deleted.

demo/app.wxss

Whitespace-only changes.

demo/computed/behavior.js

-1
This file was deleted.

demo/computed/data-path.js

-1
This file was deleted.

demo/computed/data-tracer.js

-1
This file was deleted.

demo/computed/index.js

-1
This file was deleted.

demo/miniprogram_npm/fast-deep-equal/index.js

-113
This file was deleted.

demo/miniprogram_npm/fast-deep-equal/index.js.map

-1
This file was deleted.

0 commit comments

Comments
 (0)