Skip to content

Commit

Permalink
Merge commit 'refs/tags/v2.28.0^{}' into feat/restrict-template-expre…
Browse files Browse the repository at this point in the history
…ssions_intersesion_types

# Conflicts:
#	packages/eslint-plugin/src/rules/restrict-template-expressions.ts
  • Loading branch information
ulrichb committed Apr 14, 2020
2 parents 054e62e + 73675d1 commit 27ed61f
Show file tree
Hide file tree
Showing 229 changed files with 17,498 additions and 9,044 deletions.
27 changes: 15 additions & 12 deletions .cspell.json
Expand Up @@ -11,7 +11,8 @@
"**/**/ROADMAP.md",
"**/*.{json,snap}",
".cspell.json",
"yarn.lock"
"yarn.lock",
".github/workflows/**"
],
"dictionaries": [
"typescript",
Expand All @@ -34,45 +35,47 @@
"\\(#.+?\\)"
],
"words": [
"ASTs",
"Airbnb",
"Airbnb's",
"Codecov",
"Crockford",
"errored",
"IDE's",
"IIFE",
"IIFEs",
"OOM",
"OOMs",
"Premade",
"ROADMAP",
"ASTs",
"autofix",
"autofixers",
"backticks",
"bigint",
"bivariant",
"blockless",
"codebases",
"Codecov",
"contravariant",
"Crockford",
"declarators",
"destructure",
"destructured",
"errored",
"erroring",
"ESLint",
"ESLint's",
"espree",
"estree",
"IDE's",
"IIFE",
"IIFEs",
"linebreaks",
"necroing",
"nocheck",
"nullish",
"OOM",
"OOMs",
"parameterised",
"performant",
"pluggable",
"postprocess",
"Premade",
"prettier's",
"recurse",
"reimplement",
"resync",
"ROADMAP",
"ruleset",
"rulesets",
"superset",
Expand Down
13 changes: 12 additions & 1 deletion .eslintrc.js
Expand Up @@ -174,7 +174,7 @@ module.exports = {
'@typescript-eslint/internal/no-typescript-estree-import': 'error',
},
},
// rule source files
// plugin rule source files
{
files: [
'packages/eslint-plugin-internal/src/rules/**/*.ts',
Expand All @@ -187,6 +187,17 @@ module.exports = {
'import/no-default-export': 'off',
},
},
// plugin rule tests
{
files: [
'packages/eslint-plugin-internal/tests/rules/**/*.test.ts',
'packages/eslint-plugin-tslint/tests/rules/**/*.test.ts',
'packages/eslint-plugin/tests/rules/**/*.test.ts',
],
rules: {
'@typescript-eslint/internal/plugin-test-formatting': 'error',
},
},
// tools and tests
{
files: ['**/tools/**/*.ts', '**/tests/**/*.ts'],
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/eslint-plugin-tslint.md
Expand Up @@ -15,7 +15,7 @@ The more relevant information you can include, the faster we can find the issue

<!--
Make sure you read through our FAQ before posting.
https://github.com/typescript-eslint/typescript-eslint/blob/issue-template-update/docs/getting-started/linting/FAQ.md
https://github.com/typescript-eslint/typescript-eslint/blob/master/docs/getting-started/linting/FAQ.md
-->

**Repro**
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/eslint-plugin-typescript.md
Expand Up @@ -28,7 +28,7 @@ Are you opening an issue because the rule you're trying to use is not found?

<!--
Make sure you read through our FAQ before posting.
https://github.com/typescript-eslint/typescript-eslint/blob/issue-template-update/docs/getting-started/linting/FAQ.md
https://github.com/typescript-eslint/typescript-eslint/blob/master/docs/getting-started/linting/FAQ.md
-->

**Repro**
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/typescript-eslint-parser.md
Expand Up @@ -15,7 +15,7 @@ The more relevant information you can include, the faster we can find the issue

<!--
Make sure you read through our FAQ before posting.
https://github.com/typescript-eslint/typescript-eslint/blob/issue-template-update/docs/getting-started/linting/FAQ.md
https://github.com/typescript-eslint/typescript-eslint/blob/master/docs/getting-started/linting/FAQ.md
-->

**Repro**
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/typescript-eslint-utils.md
Expand Up @@ -15,7 +15,7 @@ The more relevant information you can include, the faster we can find the issue

<!--
Make sure you read through our FAQ before posting.
https://github.com/typescript-eslint/typescript-eslint/blob/issue-template-update/docs/getting-started/linting/FAQ.md
https://github.com/typescript-eslint/typescript-eslint/blob/master/docs/getting-started/linting/FAQ.md
-->

**Repro**
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/typescript-estree.md
Expand Up @@ -15,7 +15,7 @@ The more relevant information you can include, the faster we can find the issue

<!--
Make sure you read through our FAQ before posting.
https://github.com/typescript-eslint/typescript-eslint/blob/issue-template-update/docs/getting-started/linting/FAQ.md
https://github.com/typescript-eslint/typescript-eslint/blob/master/docs/getting-started/linting/FAQ.md
-->

**Repro**
Expand Down
53 changes: 42 additions & 11 deletions .github/workflows/ci.yml
Expand Up @@ -13,7 +13,7 @@ env:

jobs:
primary_code_validation_and_tests:
name: Primary code validation and tests
name: Typecheck and tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -49,15 +49,6 @@ jobs:
- name: Typecheck all packages
run: yarn typecheck

- name: Check code formatting
run: yarn format-check

- name: Run linting
run: yarn lint

- name: Validate spelling
run: yarn check:spelling

- name: Run unit tests
run: yarn test
env:
Expand All @@ -71,6 +62,46 @@ jobs:
flags: unittest
name: codecov

linting_and_style:
name: Code style and lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ env.PRIMARY_NODE_VERSION }}
uses: actions/setup-node@v1
with:
node-version: ${{ env.PRIMARY_NODE_VERSION }}

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v1
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
# This also runs a build as part of the postinstall bootstrap
- name: Install dependencies and build
run: |
yarn --ignore-engines --frozen-lockfile
yarn check-clean-workspace-after-install
- name: Check code formatting
run: yarn format-check

- name: Lint code
run: yarn lint

- name: Lint markdown
run: yarn lint:markdown

- name: Check spelling
run: yarn check:spelling

integration_tests:
name: Run integration tests on primary Node.js version
runs-on: ubuntu-latest
Expand Down Expand Up @@ -143,7 +174,7 @@ jobs:
publish_canary_version:
name: Publish the latest code as a canary version
runs-on: ubuntu-latest
needs: [primary_code_validation_and_tests, unit_tests_on_other_node_versions, integration_tests]
needs: [primary_code_validation_and_tests, unit_tests_on_other_node_versions, linting_and_style, integration_tests]
if: github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v2
Expand Down
95 changes: 95 additions & 0 deletions .markdownlint.json
@@ -0,0 +1,95 @@
{
"default": false,

// MD001/heading-increment/header-increment - Heading levels should only increment by one level at a time
"MD001": true,
// MD002/first-heading-h1/first-header-h1 - First heading should be a top level heading
"MD002": false,
// MD003/heading-style/header-style - Heading style
"MD003": false,
// MD004/ul-style - Unordered list style
"MD004": false,
// MD005/list-indent - Inconsistent indentation for list items at the same level
"MD005": false,
// MD006/ul-start-left - Consider starting bulleted lists at the beginning of the line
"MD006": false,
// MD007/ul-indent - Unordered list indentation
"MD007": false,
// MD009/no-trailing-spaces - Trailing spaces
"MD009": false,
// MD010/no-hard-tabs - Hard tabs
"MD010": false,
// MD011/no-reversed-links - Reversed link syntax
"MD011": true,
// MD012/no-multiple-blanks - Multiple consecutive blank lines
"MD012": false,
// MD013/line-length - Line length
"MD013": { "line_length": 99999 }, // no line length
// MD014/commands-show-output - Dollar signs used before commands without showing output
"MD014": false,
// MD018/no-missing-space-atx - No space after hash on atx style heading
"MD018": true,
// MD019/no-multiple-space-atx - Multiple spaces after hash on atx style heading
"MD019": false,
// MD020/no-missing-space-closed-atx - No space inside hashes on closed atx style heading
"MD020": false,
// MD021/no-multiple-space-closed-atx - Multiple spaces inside hashes on closed atx style heading
"MD021": false,
// MD022/blanks-around-headings/blanks-around-headers - Headings should be surrounded by blank lines
"MD022": true,
// MD023/heading-start-left/header-start-left - Headings must start at the beginning of the line
"MD023": false,
// MD024/no-duplicate-heading/no-duplicate-header - Multiple headings with the same content
"MD024": false,
// MD025/single-title/single-h1 - Multiple top level headings in the same document
"MD025": true,
// MD026/no-trailing-punctuation - Trailing punctuation in heading
"MD026": { "punctuation": ".,;:!。,;:!?" }, // specifically allow "?"
// MD027/no-multiple-space-blockquote - Multiple spaces after blockquote symbol
"MD027": false,
// MD028/no-blanks-blockquote - Blank line inside blockquote
"MD028": true,
// MD029/ol-prefix - Ordered list item prefix
"MD029": false,
// MD030/list-marker-space - Spaces after list markers
"MD030": true,
// MD031/blanks-around-fences - Fenced code blocks should be surrounded by blank lines
"MD031": false,
// MD032/blanks-around-lists - Lists should be surrounded by blank lines
"MD032": false,
// MD033/no-inline-html - Inline HTML
"MD033": { "allowed_elements": ["a", "img", "br", "sup", "h1", "p"] },
// MD034/no-bare-urls - Bare URL used
"MD034": false,
// MD035/hr-style - Horizontal rule style
"MD035": false,
// MD036/no-emphasis-as-heading/no-emphasis-as-header - Emphasis used instead of a heading
"MD036": true,
// MD037/no-space-in-emphasis - Spaces inside emphasis markers
"MD037": true,
// MD038/no-space-in-code - Spaces inside code span elements
"MD038": true,
// MD039/no-space-in-links - Spaces inside link text
"MD039": true,
// MD040/fenced-code-language - Fenced code blocks should have a language specified
"MD040": true,
// MD041/first-line-heading/first-line-h1 - First line in file should be a top level heading
"MD041": false, // would love to do this, but our README files use `<h1 center>` as their heading
// MD042/no-empty-links - No empty links
"MD042": true,
// MD043/required-headings/required-headers - Required heading structure
"MD043": false,
// MD044/proper-names - Proper names should have the correct capitalization
"MD044": {
"names": ["JavaScript", "TypeScript", "TSLint", "ESLint"],
"code_blocks": false
},
// MD045/no-alt-text - Images should have alternate text (alt text)
"MD045": true,
// MD046/code-block-style - Code block style
"MD046": { "style": "fenced" },
// MD047/single-trailing-newline - Files should end with a single newline character
"MD047": false,
// MD048/code-fence-style - Code fence style
"MD048": { "style": "backtick" }
}
3 changes: 3 additions & 0 deletions .markdownlintignore
@@ -0,0 +1,3 @@
node_modules
CHANGELOG.md
tests/integration/fixtures/markdown
1 change: 1 addition & 0 deletions .prettierrc.json
@@ -1,3 +1,4 @@
{
"singleQuote": true,
"trailingComma": "all"
}
3 changes: 2 additions & 1 deletion .vscode/extensions.json
Expand Up @@ -3,7 +3,8 @@
"esbenp.prettier-vscode",
"dbaeumer.vscode-eslint",
"editorconfig.editorconfig",
"streetsidesoftware.code-spell-checker"
"streetsidesoftware.code-spell-checker",
"davidanson.vscode-markdownlint"
],
"unwantedRecommendations": ["hookyqr.beautify", "dbaeumer.jshint"]
}
2 changes: 1 addition & 1 deletion .vscode/settings.json
Expand Up @@ -17,5 +17,5 @@
"typescript.preferences.importModuleSpecifier": "auto",
"javascript.preferences.quoteStyle": "single",
"typescript.preferences.quoteStyle": "single",
"editor.defaultFormatter": "esbenp.prettier-vscode"
"editor.defaultFormatter": "esbenp.prettier-vscode",
}

0 comments on commit 27ed61f

Please sign in to comment.