Skip to content

Commit 452017e

Browse files
committed
Merge branch 'master' into type-fix-support-2
2 parents 024755d + 151bb2b commit 452017e

File tree

348 files changed

+70741
-44016
lines changed

Some content is hidden

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

348 files changed

+70741
-44016
lines changed

.eslintignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
coverage
1+
coverage/

.eslintrc

+25-8
Original file line numberDiff line numberDiff line change
@@ -14,30 +14,41 @@
1414
"sourceType": "script",
1515
},
1616
"rules": {
17-
"comma-dangle": [2, "never"],
18-
"object-curly-spacing": [2, "never"],
19-
"object-shorthand": [2, "always"],
20-
"array-bracket-spacing": [2, "never"],
17+
"comma-dangle": [2, "always-multiline"],
18+
"object-shorthand": [2, "always", {
19+
"ignoreConstructors": false,
20+
"avoidQuotes": false, // this is the override vs airbnb
21+
}],
2122
"max-len": [2, 120, {
2223
"ignoreStrings": true,
2324
"ignoreTemplateLiterals": true,
2425
"ignoreComments": true,
2526
}],
26-
"operator-linebreak": [2, "after"],
2727
"consistent-return": 0,
2828

2929
"prefer-destructuring": [2, { "array": false, "object": false }, { "enforceForRenamedProperties": false }],
30-
30+
"prefer-object-spread": 0, // until node 8 is required
31+
"prefer-rest-params": 0, // until node 6 is required
32+
"prefer-spread": 0, // until node 6 is required
33+
"function-call-argument-newline": 1, // TODO: enable
3134
"function-paren-newline": 0,
3235
"no-plusplus": 1,
3336
"no-param-reassign": 1,
34-
"no-mixed-operators": 1,
35-
"no-restricted-syntax": 1,
37+
"no-unreachable-loop": 1, // TODO: enable
38+
"no-restricted-syntax": [2, {
39+
"selector": "ObjectPattern",
40+
"message": "Object destructuring is not compatible with Node v4"
41+
}],
42+
"strict": [2, "safe"],
3643
"valid-jsdoc": [2, {
3744
"requireReturn": false,
3845
"requireParamDescription": false,
3946
"requireReturnDescription": false,
4047
}],
48+
49+
"eslint-plugin/consistent-output": 0,
50+
"eslint-plugin/require-meta-schema": 0,
51+
"eslint-plugin/require-meta-type": 0
4152
},
4253
"overrides": [
4354
{
@@ -46,5 +57,11 @@
4657
"no-template-curly-in-string": 1,
4758
},
4859
},
60+
{
61+
"files": "markdown.config.js",
62+
"rules": {
63+
"no-console": 0,
64+
},
65+
},
4966
],
5067
}

.github/workflows/node-4+.yml

+117
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
name: 'Tests: node.js'
2+
3+
on: [pull_request, push]
4+
5+
jobs:
6+
matrix:
7+
runs-on: ubuntu-latest
8+
outputs:
9+
latest: ${{ steps.set-matrix.outputs.requireds }}
10+
minors: ${{ steps.set-matrix.outputs.optionals }}
11+
steps:
12+
- uses: ljharb/actions/node/matrix@main
13+
id: set-matrix
14+
with:
15+
versionsAsRoot: true
16+
type: majors
17+
preset: '>=4'
18+
19+
latest:
20+
needs: [matrix]
21+
name: 'latest majors'
22+
runs-on: ubuntu-latest
23+
24+
strategy:
25+
fail-fast: false
26+
matrix:
27+
node-version: ${{ fromJson(needs.matrix.outputs.latest) }}
28+
eslint:
29+
- 8
30+
- 7
31+
- 6
32+
- 5
33+
- 4
34+
- 4.14 # last version without messageId
35+
- 3
36+
babel-eslint:
37+
- 10
38+
- 9
39+
- 8
40+
exclude:
41+
- node-version: 5
42+
babel-eslint: 10
43+
- node-version: 5
44+
babel-eslint: 9
45+
- node-version: 4
46+
babel-eslint: 10
47+
- node-version: 4
48+
babel-eslint: 9
49+
- node-version: 15
50+
eslint: 8
51+
- node-version: 13
52+
eslint: 8
53+
- node-version: 11
54+
eslint: 8
55+
- node-version: 11
56+
eslint: 7
57+
- node-version: 10
58+
eslint: 8
59+
- node-version: 9
60+
eslint: 8
61+
- node-version: 9
62+
eslint: 7
63+
- node-version: 8
64+
eslint: 8
65+
- node-version: 8
66+
eslint: 7
67+
- node-version: 7
68+
eslint: 8
69+
- node-version: 7
70+
eslint: 7
71+
- node-version: 7
72+
eslint: 6
73+
- node-version: 6
74+
eslint: 8
75+
- node-version: 6
76+
eslint: 7
77+
- node-version: 6
78+
eslint: 6
79+
- node-version: 5
80+
eslint: 8
81+
- node-version: 5
82+
eslint: 7
83+
- node-version: 5
84+
eslint: 6
85+
- node-version: 5
86+
eslint: 5
87+
- node-version: 4
88+
eslint: 8
89+
- node-version: 4
90+
eslint: 7
91+
- node-version: 4
92+
eslint: 6
93+
- node-version: 4
94+
eslint: 5
95+
96+
steps:
97+
- uses: actions/checkout@v2
98+
- uses: ljharb/actions/node/install@main
99+
name: 'nvm install ${{ matrix.node-version }} && npm install'
100+
with:
101+
node-version: ${{ matrix.node-version }}
102+
after_install: |
103+
npm install --no-save "eslint@${{ matrix.eslint }}" "@typescript-eslint/parser@${{ matrix.node-version >= 14 && '5' || (matrix.node-version >= 12 && '4' || (matrix.node-version >= 10 && '4.0' || (matrix.node-version >= 8 && '3' || '2'))) }}" "babel-eslint@${{ matrix.babel-eslint }}"
104+
skip-ls-check: ${{ matrix.node-version < 10 && true || false }}
105+
env:
106+
NPM_CONFIG_LEGACY_PEER_DEPS: true
107+
- run: npx ls-engines
108+
if: ${{ matrix.node-version >= 12 }}
109+
- run: npm run unit-test
110+
- uses: codecov/codecov-action@v1
111+
112+
node:
113+
name: 'node 4+'
114+
needs: [latest]
115+
runs-on: ubuntu-latest
116+
steps:
117+
- run: 'echo tests completed'

.github/workflows/node-pretest.yml

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: 'Tests: pretest/posttest'
2+
3+
on: [pull_request, push]
4+
5+
jobs:
6+
pretest:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- uses: actions/checkout@v2
11+
- uses: ljharb/actions/node/install@main
12+
name: 'nvm install lts/* && npm install'
13+
with:
14+
node-version: 'lts/*'
15+
env:
16+
NPM_CONFIG_LEGACY_PEER_DEPS: true
17+
- run: npm run pretest
18+
19+
posttest:
20+
runs-on: ubuntu-latest
21+
22+
steps:
23+
- uses: actions/checkout@v2
24+
- uses: ljharb/actions/node/install@main
25+
name: 'nvm install lts/* && npm install'
26+
with:
27+
node-version: 'lts/*'
28+
env:
29+
NPM_CONFIG_LEGACY_PEER_DEPS: true
30+
- run: npx ls-engines
31+
- run: echo 'legacy-peer-deps=true' >> .npmrc
32+
- run: npm run posttest

.github/workflows/readme.yml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: 'Tests: readme'
2+
3+
on: [pull_request, push]
4+
5+
jobs:
6+
readme:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- uses: actions/checkout@v2
11+
- uses: ljharb/actions/node/install@main
12+
name: 'nvm install lts/* && npm install'
13+
with:
14+
node-version: 'lts/*'
15+
env:
16+
NPM_CONFIG_LEGACY_PEER_DEPS: true
17+
- run: npm run generate-list-of-rules:check

.github/workflows/rebase.yml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Automatic Rebase
2+
3+
on: [pull_request_target]
4+
5+
jobs:
6+
_:
7+
name: "Automatic Rebase"
8+
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v2
13+
- uses: ljharb/rebase@master
14+
env:
15+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: Require “Allow Edits”
2+
3+
on: [pull_request_target]
4+
5+
jobs:
6+
_:
7+
name: "Require “Allow Edits”"
8+
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: ljharb/require-allow-edits@main

.github/workflows/smoke-test.yml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Smoke test
2+
3+
on:
4+
schedule:
5+
- cron: '0 0 * * SUN'
6+
workflow_dispatch:
7+
8+
jobs:
9+
smoke-test:
10+
if: ${{ github.repository == 'yannickcr/eslint-plugin-react' || github.event_name == 'workflow_dispatch' }}
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
- uses: ljharb/actions/node/install@main
15+
name: 'nvm install lts/* && npm install'
16+
with:
17+
node-version: 'lts/*'
18+
skip-ls-check: true
19+
- run: |
20+
npm link
21+
npm link eslint-plugin-react
22+
- uses: AriPerkkio/eslint-remote-tester-run-action@v2
23+
with:
24+
issue-title: 'Results of weekly scheduled smoke test'
25+
eslint-remote-tester-config: test/eslint-remote-tester.config.js

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ node_modules
1919
!tests/**/node_modules
2020
npm-debug.log
2121
sftp-config.json
22+
eslint-remote-tester-results
2223

2324
# Only apps should have lockfiles
2425
yarn.lock

.travis.yml

-43
This file was deleted.

0 commit comments

Comments
 (0)