Skip to content

Commit

Permalink
Merge pull request #84 from ice-lab/version2.0.0
Browse files Browse the repository at this point in the history
build-scripts-2.0.0
  • Loading branch information
ClarkXia authored Nov 22, 2022
2 parents 78dc611 + 87cd419 commit 34c52d3
Show file tree
Hide file tree
Showing 111 changed files with 12,449 additions and 2,120 deletions.
16 changes: 2 additions & 14 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,6 @@ expected
website
gh-pages
vendors
packages/build-scripts/test
packages/template-plugin/tests
packages/build-scripts/bin
packages/build-scripts/lib
packages/build-plugin-store/lib
packages/build-plugin-ice-router/lib
packages/build-plugin-ice-stark-child/lib
packages/build-plugin-env-config/lib
packages/build-plugin-webpack5/lib
packages/build-plugin-rml/lib
packages/build-plugin-stark-module/lib
packages/build-plugin-stark-module/test
packages/template-component-demo/lib
packages/template-component-demo/es
examples
__tests__/fixtures
lib
39 changes: 5 additions & 34 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,38 +1,9 @@
const { eslint, tslint, deepmerge } = require('@ice/spec');
const { getESLintConfig } = require('@iceworks/spec');

const commonRules = {
'global-require': 0,
'import/no-dynamic-require': 0,
'no-restricted-syntax': ['error', "BinaryExpression[operator='of']"],
'import/order': 0,
};

const jsRules = deepmerge(eslint, {
module.exports = getESLintConfig('react-ts', {
rules: {
...commonRules,
'no-async-promise-executor': 'off',
'@iceworks/best-practices/recommend-polyfill': 'off',
'@typescript-eslint/no-invalid-void-type': 'off',
},
});

const tsRules = deepmerge(tslint, {
rules: {
...commonRules,
'@typescript-eslint/explicit-function-return-type': [
'warn',
{
allowTypedFunctionExpressions: true,
},
],
},
});

delete tsRules.root;

module.exports = {
...jsRules,
overrides: [
{
...tsRules,
files: ['**/*.ts', '**/*.tsx'],
},
],
};
15 changes: 12 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,26 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x]
node-version: [14.x]
steps:
- uses: actions/checkout@v2
- name: Set branch name
run: echo >>$GITHUB_ENV BRANCH_NAME=${GITHUB_REF#refs/heads/}

- name: Echo branch name
run: echo ${BRANCH_NAME}

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
registry-url: https://registry.npmjs.org/
- run: npm run setup
- run: npm run test

- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 6

- run: pnpm run setup
- run: pnpm run test
- run: pnpm run coverage
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,4 @@ examples/react-component/es
packages/template-component-demo/lib
packages/template-component-demo/es

.pnpm-debug.log
Loading

0 comments on commit 34c52d3

Please sign in to comment.