Skip to content

Commit

Permalink
Merge branch 'master' into pr/sonallux/3349
Browse files Browse the repository at this point in the history
# Conflicts:
#	packages/eslint-plugin/README.md
  • Loading branch information
bradzacher committed Sep 20, 2021
2 parents 4ad208d + 0bb96ca commit 5ec8e3d
Show file tree
Hide file tree
Showing 450 changed files with 23,652 additions and 15,587 deletions.
7 changes: 7 additions & 0 deletions .all-contributorsrc
Expand Up @@ -400,6 +400,13 @@
"avatar_url": "https://avatars.githubusercontent.com/u/16860535?v=4",
"profile": "https://github.com/soobing",
"contributions": []
},
{
"login": "RebeccaStevens",
"name": "Rebecca Stevens",
"avatar_url": "https://avatars.githubusercontent.com/u/7224206?v=4",
"profile": "https://github.com/RebeccaStevens",
"contributions": []
}
],
"contributorsPerLine": 5
Expand Down
19 changes: 14 additions & 5 deletions .eslintrc.js
Expand Up @@ -25,9 +25,10 @@ module.exports = {
'./tests/integration/utils/jsconfig.json',
'./packages/*/tsconfig.json',
],
allowAutomaticSingleRunInference: true,
tsconfigRootDir: __dirname,
warnOnUnsupportedTypeScriptVersion: false,
EXPERIMENTAL_useSourceOfProjectReferenceRedirect: true,
EXPERIMENTAL_useSourceOfProjectReferenceRedirect: false,
},
rules: {
//
Expand Down Expand Up @@ -64,9 +65,6 @@ module.exports = {
],

// TODO - enable these new recommended rules
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/no-unsafe-return': 'off',
'@typescript-eslint/restrict-template-expressions': 'off',
// TODO - enable this
'@typescript-eslint/naming-convention': 'off',
Expand All @@ -87,6 +85,10 @@ module.exports = {
'no-mixed-operators': 'error',
'no-console': 'error',
'no-process-exit': 'error',
'no-fallthrough': [
'warn',
{ commentPattern: '.*intentional fallthrough.*' },
],

//
// eslint-plugin-eslint-comment
Expand Down Expand Up @@ -160,14 +162,19 @@ module.exports = {
// all test files
{
files: [
'packages/*/tests/**/*.test.ts',
'packages/*/tests/**/*.spec.ts',
'packages/*/tests/**/*.test.ts',
'packages/*/tests/**/spec.ts',
'packages/*/tests/**/test.ts',
'packages/parser/tests/**/*.ts',
],
env: {
'jest/globals': true,
},
rules: {
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/no-unsafe-return': 'off',
'eslint-plugin/no-identical-tests': 'error',
'jest/no-disabled-tests': 'warn',
'jest/no-focused-tests': 'error',
Expand All @@ -193,6 +200,8 @@ module.exports = {
rules: {
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-unsafe-call': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/no-unsafe-return': 'off',
'@typescript-eslint/restrict-plus-operands': 'off',
},
},
Expand Down
71 changes: 28 additions & 43 deletions .github/workflows/ci.yml
Expand Up @@ -4,14 +4,14 @@ on:
push:
branches:
- master
# TODO - delete this before merging v4 into master
- v4
pull_request:
branches:
- '**'

env:
PRIMARY_NODE_VERSION: 12
NX_BRANCH: ${{ github.event.number }}
NX_RUN_GROUP: ${{ github.run_id }}

jobs:
typecheck:
Expand Down Expand Up @@ -43,7 +43,7 @@ jobs:
- name: Install dependencies
run: |
yarn --ignore-engines --frozen-lockfile --ignore-scripts
yarn check:clean-workspace-after-install
yarn check-clean-workspace-after-install
- name: Build
run: |
Expand Down Expand Up @@ -85,57 +85,49 @@ jobs:
- name: Install dependencies
run: |
yarn --ignore-engines --frozen-lockfile --ignore-scripts
yarn check:clean-workspace-after-install
yarn check-clean-workspace-after-install
- name: Build
run: |
yarn build
- name: Run unit tests for typescript-estree
run: yarn test
working-directory: packages/typescript-estree
run: npx nx test @typescript-eslint/typescript-estree
env:
CI: true

- name: Run unit tests for visitor-keys
run: yarn test
working-directory: packages/visitor-keys
run: npx nx test @typescript-eslint/visitor-keys
env:
CI: true

- name: Run unit tests for scope-manager
run: yarn test
working-directory: packages/scope-manager
run: npx nx test @typescript-eslint/scope-manager
env:
CI: true

- name: Run unit tests for experimental-utils
run: yarn test
working-directory: packages/experimental-utils
run: npx nx test @typescript-eslint/experimental-utils
env:
CI: true

- name: Run unit tests for parser
run: yarn test
working-directory: packages/parser
run: npx nx test @typescript-eslint/parser
env:
CI: true

- name: Run unit tests for eslint-plugin
run: yarn test
working-directory: packages/eslint-plugin
run: npx nx test @typescript-eslint/eslint-plugin
env:
CI: true

- name: Run unit tests for eslint-plugin-tslint
run: yarn test
working-directory: packages/eslint-plugin-tslint
run: npx nx test @typescript-eslint/eslint-plugin-tslint
env:
CI: true

- name: Run unit tests for eslint-plugin-internal
run: yarn test
working-directory: packages/eslint-plugin-internal
run: npx nx test @typescript-eslint/eslint-plugin-internal
env:
CI: true

Expand Down Expand Up @@ -171,23 +163,23 @@ jobs:
- name: Install dependencies
run: |
yarn --ignore-engines --frozen-lockfile --ignore-scripts
yarn check:clean-workspace-after-install
yarn check-clean-workspace-after-install
- name: Build
run: |
yarn build
- name: Check code formatting
run: yarn check:format
run: yarn check-format

- name: Lint code
run: yarn lint

- name: Lint markdown
run: yarn lint:markdown
run: yarn lint-markdown

- name: Check spelling
run: yarn check:spelling
run: yarn check-spelling

integration_tests:
name: Run integration tests on primary Node.js version
Expand All @@ -214,14 +206,14 @@ jobs:
- name: Install dependencies
run: |
yarn --ignore-engines --frozen-lockfile --ignore-scripts
yarn check:clean-workspace-after-install
yarn check-clean-workspace-after-install
- name: Build
run: |
yarn build
- name: Run integrations tests
run: yarn test:integration
run: yarn test-integration
env:
CI: true

Expand Down Expand Up @@ -253,51 +245,44 @@ jobs:
- name: Install dependencies
run: |
yarn --ignore-engines --frozen-lockfile --ignore-scripts
yarn check:clean-workspace-after-install
yarn check-clean-workspace-after-install
- name: Build
run: |
yarn build
- name: Run unit tests for typescript-estree
run: yarn test
working-directory: packages/typescript-estree
run: npx nx test @typescript-eslint/typescript-estree
env:
CI: true

- name: Run unit tests for visitor-keys
run: yarn test
working-directory: packages/visitor-keys
run: npx nx test @typescript-eslint/visitor-keys
env:
CI: true

- name: Run unit tests for scope-manager
run: yarn test
working-directory: packages/scope-manager
run: npx nx test @typescript-eslint/scope-manager
env:
CI: true

- name: Run unit tests for experimental-utils
run: yarn test
working-directory: packages/experimental-utils
run: npx nx test @typescript-eslint/experimental-utils
env:
CI: true

- name: Run unit tests for parser
run: yarn test
working-directory: packages/parser
run: npx nx test @typescript-eslint/parser
env:
CI: true

- name: Run unit tests for eslint-plugin
run: yarn test
working-directory: packages/eslint-plugin
run: npx nx test @typescript-eslint/eslint-plugin
env:
CI: true

- name: Run unit tests for eslint-plugin-tslint
run: yarn test
working-directory: packages/eslint-plugin-tslint
run: npx nx test @typescript-eslint/eslint-plugin-tslint
env:
CI: true

Expand All @@ -307,7 +292,7 @@ jobs:
name: Publish the latest code as a canary version
runs-on: ubuntu-latest
needs: [typecheck, test_on_primary_node_version, unit_tests_on_other_node_versions, linting_and_style, integration_tests]
if: github.ref == 'refs/heads/master'
if: github.repository == 'typescript-eslint/typescript-eslint' && github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v2
# Fetch all history for all tags and branches in this job because lerna needs it
Expand Down Expand Up @@ -335,7 +320,7 @@ jobs:
- name: Install dependencies
run: |
yarn --ignore-engines --frozen-lockfile --ignore-scripts
yarn check:clean-workspace-after-install
yarn check-clean-workspace-after-install
- name: Build
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/generate-contributors.yml
Expand Up @@ -35,7 +35,7 @@ jobs:
yarn --ignore-engines --frozen-lockfile --ignore-scripts
- name: Generate contributors
run: yarn generate:contributors
run: yarn generate-contributors

- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
Expand Down

0 comments on commit 5ec8e3d

Please sign in to comment.