Skip to content

Commit dd450a8

Browse files
Get node 16 build working, centralize lint configs and switch to dts-cli (#2951)
* Get node 16 build working and centralize lint configs - Added `.eslintrc-javascript` for the common configs needed for `antd`, `playground` and `semantic-ui` - Added `.eslintrc-typescript` for the common configs needed for the rest of the packages - Updated `.github/workflows/ci.yml` to add node 16 and to build the playground using it instead of 14 - Updated `.gitignore` to add the few items from the `.gitignore` files in sub-packages - Removed the `.gitignore` in the sub-packages, along with the two `.editorconfig` files - Updated all of the `.eslintrc` files in the packages to extend the appropriate `.eslintrc-*script` file - Left the `plugins` array definitions in each `.eslintrc` file - Avoids an issue where eslint found the base and sub-package implementation of the plugins and complained when they were in the base - Updated the main `package*.json` to add the packages needed for linting so that they can be removed in the sub-packages - Updated each sub-package `package*.json` files to remove all but the `eslint` package (leaving it locally so that it can be run in the subdirectory) - Also bumped any out-of-date packages related to `babel` or `eslint` * - Replaced `tsdx` with its most current forked cousin `dts-cli` - This removed the need for the `.npmrc` file in `chakra-ui` * - Re-ran `npm run cs-format` due to prettier upgrades provided by `dts-cli` - Also fixed some typescript issues in `fluent-ui` related to object spreading by casting `options.props as object` * - Fixed tests due to change to `dts-cli` - Added `jest-environment-jsdom` and `ts-jest` that matches the jest version `dts-cli` uses in the main `package.json` - Updated `package.json`s to remove incompatible jest related packages - Updated and/or moved `jest.config.js` files to add `testEnvironment` and `testEnvironmentOptions` for `jsdom` - Updated `chakra-ui` and `mui` to add missing libraries for emotion and jest - Redid the `mui` snapshots after changes * - Rollback `semantic-ui` so that it still uses `tsdx` due to test failures using `dts-cli` * - Bumped `eslint` to 8.20
1 parent 3c07647 commit dd450a8

File tree

113 files changed

+434165
-1049446
lines changed

Some content is hidden

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

113 files changed

+434165
-1049446
lines changed

.eslintrc-javascript

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"extends": "eslint:recommended",
3+
"parser": "@babel/eslint-parser",
4+
"parserOptions": {
5+
"babelOptions": {
6+
"presets": ["@babel/preset-react"]
7+
}
8+
},
9+
"rules": {
10+
"react/jsx-uses-react": 2,
11+
"react/jsx-uses-vars": 2,
12+
"react/react-in-jsx-scope": 2,
13+
"react/jsx-tag-spacing": [1, {
14+
"beforeSelfClosing": "always"
15+
}],
16+
"curly": [2],
17+
"linebreak-style": [2, "unix"],
18+
"semi": [2, "always"],
19+
"comma-dangle": [0],
20+
"no-unused-vars": [2, {
21+
"vars": "all",
22+
"args": "none",
23+
"ignoreRestSiblings": true
24+
}],
25+
"no-console": [0],
26+
"object-curly-spacing": [2, "always"],
27+
"keyword-spacing": ["error"]
28+
},
29+
"env": {
30+
"es6": true,
31+
"browser": true,
32+
"node": true
33+
}
34+
}

.eslintrc-typescript

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"parser": "@typescript-eslint/parser",
3+
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
4+
"rules": {
5+
"react/jsx-uses-react": 2,
6+
"react/jsx-uses-vars": 2,
7+
"react/react-in-jsx-scope": 2,
8+
"react/jsx-tag-spacing": [1, {
9+
"beforeSelfClosing": "always"
10+
}],
11+
"curly": [2],
12+
"linebreak-style": [2, "unix"],
13+
"semi": [2, "always"],
14+
"comma-dangle": [0],
15+
"@typescript-eslint/no-unused-vars": [2, {
16+
"vars": "all",
17+
"args": "none",
18+
"ignoreRestSiblings": true
19+
}],
20+
"no-console": [0],
21+
"object-curly-spacing": [2, "always"],
22+
"keyword-spacing": ["error"],
23+
"no-prototype-builtins": "warn",
24+
"@typescript-eslint/no-empty-function": "warn",
25+
"@typescript-eslint/no-var-requires": "warn"
26+
},
27+
"env": {
28+
"es6": true,
29+
"browser": true,
30+
"node": true
31+
}
32+
}

.github/workflows/ci.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
strategy:
1313
matrix:
14-
node-version: [12.x, 14.x]
14+
node-version: [12.x, 14.x, 16.x]
1515

1616
steps:
1717
- uses: actions/checkout@v3
@@ -32,7 +32,7 @@ jobs:
3232
if: github.ref == 'refs/heads/master'
3333
run: npm run build
3434

35-
- if: matrix.node-version == '14.x'
35+
- if: matrix.node-version == '16.x'
3636
uses: actions/upload-artifact@v2
3737
with:
3838
name: dist

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ $RECYCLE.BIN/
110110

111111
# Windows shortcuts
112112
*.lnk
113+
.rts2_**
113114

114115
# End of https://www.gitignore.io/api/osx,node,linux,windows
115116

@@ -127,6 +128,7 @@ yarn.lock
127128
.vscode
128129
.idea
129130
*.iml
131+
.editorconfig
130132

131133
# Code coverage
132134
coverage

0 commit comments

Comments
 (0)