Skip to content

Commit 103d3a4

Browse files
Merge pull request #683 from eslint-functional/next
close #599 close #678 fix #467 fix #576 fix #577 fix #611 fix #675 fix #691 fix #692
2 parents ca1d1fa + 57e24d1 commit 103d3a4

File tree

258 files changed

+8641
-7251
lines changed

Some content is hidden

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

258 files changed

+8641
-7251
lines changed

.eslintrc.json

Lines changed: 43 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,20 @@
1212
"prettier"
1313
],
1414
"parserOptions": {
15-
"project": [
16-
"./tsconfig.json",
17-
"./tests/tsconfig.json",
18-
"./cz-adapter/tsconfig.json"
19-
]
15+
"project": true
2016
},
21-
"ignorePatterns": ["/build/", "/coverage/", "/lib/", "/cz-adapter/**/*.js"],
17+
"ignorePatterns": [
18+
"/build/",
19+
"/coverage/",
20+
"/lib/",
21+
"/tests-compiled/",
22+
"/cz-adapter/**/*.js"
23+
],
2224
"rules": {
23-
"functional/prefer-immutable-types": "off"
25+
"functional/prefer-immutable-types": "off",
26+
"@typescript-eslint/no-explicit-any": "warn",
27+
"@typescript-eslint/no-unnecessary-condition": "off",
28+
"@typescript-eslint/restrict-plus-operands": "off"
2429
},
2530
"overrides": [
2631
{
@@ -59,15 +64,26 @@
5964
},
6065
{
6166
"files": ["**/*.test.ts"],
62-
"plugins": ["ava"],
63-
"extends": ["plugin:ava/recommended"],
6467
"rules": {
6568
"@typescript-eslint/no-unsafe-argument": "off",
6669
"@typescript-eslint/no-unsafe-assignment": "off",
6770
"@typescript-eslint/no-unsafe-call": "off",
6871
"@typescript-eslint/no-unsafe-member-access": "off",
6972
"@typescript-eslint/no-unsafe-return": "off",
70-
"jsdoc/require-jsdoc": "off"
73+
"@typescript-eslint/no-unused-vars-experimental": "off",
74+
"@typescript-eslint/strict-boolean-expressions": "off",
75+
"eslint-comments/disable-enable-pair": "off",
76+
"eslint-comments/no-unlimited-disable": "off",
77+
"functional/functional-parameters": "off",
78+
"functional/no-conditional-statements": "off",
79+
"functional/no-expression-statements": "off",
80+
"functional/no-loop-statements": "off",
81+
"functional/no-return-void": "off",
82+
"import/no-named-as-default-member": "off",
83+
"jsdoc/require-jsdoc": "off",
84+
"sonarjs/no-duplicate-string": "off",
85+
"sonarjs/no-identical-functions": "off",
86+
"unicorn/prefer-module": "off"
7187
}
7288
},
7389
{
@@ -84,64 +100,40 @@
84100
"parserOptions": {
85101
"project": null
86102
},
87-
"extends": ["plugin:markdown/recommended", "plugin:functional/off"],
103+
"extends": [
104+
"plugin:markdown/recommended",
105+
"plugin:@typescript-eslint/disable-type-checked",
106+
"plugin:functional/off"
107+
],
88108
"rules": {
89-
"@typescript-eslint/await-thenable": "off",
90109
"@typescript-eslint/consistent-type-definitions": "off",
91-
"@typescript-eslint/dot-notation": "off",
92110
"@typescript-eslint/explicit-member-accessibility": "off",
93-
"@typescript-eslint/naming-convention": "off",
94-
"@typescript-eslint/no-confusing-void-expression": "off",
95111
"@typescript-eslint/no-empty-function": "off",
96112
"@typescript-eslint/no-explicit-any": "off",
97-
"@typescript-eslint/no-floating-promises": "off",
98-
"@typescript-eslint/no-for-in-array": "off",
99-
"@typescript-eslint/no-implied-eval": "off",
100-
"@typescript-eslint/no-misused-promises": "off",
101-
"@typescript-eslint/no-throw-literal": "off",
102-
"@typescript-eslint/no-unnecessary-condition": "off",
103-
"@typescript-eslint/no-unnecessary-type-assertion": "off",
104-
"@typescript-eslint/no-unsafe-argument": "off",
105-
"@typescript-eslint/no-unsafe-assignment": "off",
106-
"@typescript-eslint/no-unsafe-call": "off",
107-
"@typescript-eslint/no-unsafe-member-access": "off",
108-
"@typescript-eslint/no-unsafe-return": "off",
109113
"@typescript-eslint/no-unused-expressions": "off",
110114
"@typescript-eslint/no-unused-vars": "off",
111-
"@typescript-eslint/non-nullable-type-assertion-style": "off",
112-
"@typescript-eslint/prefer-includes": "off",
113-
"@typescript-eslint/prefer-nullish-coalescing": "off",
114-
"@typescript-eslint/prefer-readonly-parameter-types": "off",
115-
"@typescript-eslint/prefer-readonly": "off",
116-
"@typescript-eslint/prefer-regexp-exec": "off",
117-
"@typescript-eslint/prefer-string-starts-ends-with": "off",
118-
"@typescript-eslint/promise-function-async": "off",
119-
"@typescript-eslint/require-await": "off",
120-
"@typescript-eslint/restrict-plus-operands": "off",
121-
"@typescript-eslint/restrict-template-expressions": "off",
122-
"@typescript-eslint/strict-boolean-expressions": "off",
123-
"@typescript-eslint/switch-exhaustiveness-check": "off",
124-
"@typescript-eslint/unbound-method": "off",
115+
"@typescript-eslint/prefer-function-type": "off",
116+
"@typescript-eslint/consistent-generic-constructors": "off",
125117
"import/no-unresolved": "off",
126118
"init-declarations": "off",
127119
"jsdoc/require-jsdoc": "off",
128-
"no-console": "off",
129-
"no-empty": "off",
130-
"no-invalid-this": "off",
131-
"no-undef": "off",
132-
"no-useless-return": "off",
133-
"node/handle-callback-err": "off",
120+
"n/handle-callback-err": "off",
134121
"prefer-const": "off",
135122
"prettier/prettier": "off",
136123
"sonarjs/no-extra-arguments": "off",
137124
"sonarjs/no-unused-collection": "off",
138125
"unicorn/prefer-optional-catch-binding": "off",
139126
"unicorn/prefer-top-level-await": "off",
140127
"unicorn/switch-case-braces": "off",
141-
142-
"dot-notation": "error",
143-
"no-implied-eval": "error",
144-
"require-await": "error"
128+
"no-console": "off",
129+
"no-empty": "off",
130+
"no-invalid-this": "off",
131+
"no-undef": "off",
132+
"no-useless-return": "off",
133+
"dot-notation": "off",
134+
"no-empty-function": "off",
135+
"no-throw-literal": "off",
136+
"no-unused-vars": "off"
145137
}
146138
}
147139
]

.gitattributes

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
/.husky/** linguist-detectable=false
77

88
**/tsconfig.json linguist-language=jsonc
9-
**/tsconfig.*.json linguist-language=jsonc
109
/.lintstagedrc linguist-language=json
1110
/.vscode/*.json linguist-language=jsonc
1211

.github/FUNDING.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1-
issuehunt: eslint-functional/eslint-plugin-functional
1+
tidelift: npm/eslint-plugin-functional
22
ko_fi: rebeccastevens
33
custom: https://github.com/eslint-functional/eslint-plugin-functional/blob/main/DONATIONS.md
4+
issuehunt: eslint-functional/eslint-plugin-functional

.github/workflows/sync-labels.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,21 @@ on:
44
push:
55
branches:
66
- main
7+
paths:
8+
- .github/labels.yml
79
workflow_dispatch:
810

11+
permissions:
12+
pull-requests: write
13+
914
jobs:
1015
build:
1116
runs-on: ubuntu-latest
1217
steps:
1318
- uses: actions/checkout@v3
1419

1520
- uses: micnncim/action-label-syncer@v1
21+
with:
22+
manifest: .github/labels.yml
1623
env:
1724
GITHUB_TOKEN: ${{ github.token }}

.github/workflows/test-js.yml

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ jobs:
1919
ts_version:
2020
- "next"
2121
- "latest"
22-
- "4.0.2"
23-
- "JS"
22+
- "4.3.5"
23+
# - "JS"
2424
runs-on: ${{ matrix.os }}
2525
continue-on-error: ${{ matrix.ts_version == 'next' }}
2626
env:
@@ -47,21 +47,6 @@ jobs:
4747
if: matrix.ts_version != 'JS'
4848
run: pnpm add -D typescript@"${{ matrix.ts_version }}"
4949

50-
- name: Remove incompatible settings for ts 4.0.2
51-
if: matrix.ts_version == '4.0.2'
52-
run: |
53-
node -e '
54-
const fs = require("fs");
55-
const filename = "./tsconfig.base.json";
56-
const tsConfig = require(filename);
57-
delete tsConfig.compilerOptions.exactOptionalPropertyTypes;
58-
delete tsConfig.compilerOptions.noPropertyAccessFromIndexSignature;
59-
delete tsConfig.compilerOptions.noUncheckedIndexedAccess;
60-
const tsConfigString = JSON.stringify(tsConfig, undefined, 2);
61-
fs.writeFileSync(filename, tsConfigString, { encoding: "utf8" });
62-
console.log("TS Config updated successfully.");
63-
'
64-
6550
- name: Run Tests
6651
run: pnpm test-compiled
6752

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
/lib/
22
/build/
33
/coverage/
4-
5-
.nyc_output/
4+
/tests-compiled/
65

76
node_modules/
87

.nycrc

Lines changed: 0 additions & 13 deletions
This file was deleted.

.prettierignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
/lib/
33
/build/
44
/coverage/
5-
6-
.nyc_output/
5+
/tests-compiled/
76

87
node_modules/
98
pnpm-lock.yaml

.releaserc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ plugins:
4444
- changelogTitle: "# Changelog
4545
4646
All notable changes to this project will be documented in this file. Dates are displayed in UTC."
47-
- - "@google/semantic-release-replace-plugin"
47+
- - "semantic-release-replace-plugin"
4848
- replacements:
4949
- files:
5050
- "./lib/**/*"

.vscode/launch.json

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,18 @@
11
{
2-
// Use IntelliSense to learn about possible attributes.
3-
// Hover to view descriptions of existing attributes.
42
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
53
"version": "0.2.0",
64
"configurations": [
75
{
86
"type": "node",
97
"request": "launch",
10-
"name": "AVA Test Current Test File",
11-
"program": "${workspaceFolder}/node_modules/ava/entrypoints/cli.mjs",
12-
"args": ["${file}"],
13-
"outputCapture": "std",
14-
"skipFiles": ["<node_internals>/**/*.js"],
15-
"env": {
16-
"TEST_ALL_FILES": "1"
17-
},
8+
"name": "Debug Current Test File",
9+
"autoAttachChildProcesses": true,
10+
"skipFiles": ["<node_internals>/**", "**/node_modules/**"],
11+
"program": "${workspaceRoot}/node_modules/vitest/vitest.mjs",
12+
"args": ["run", "${relativeFile}"],
13+
"smartStep": true,
1814
"sourceMaps": true,
19-
"console": "integratedTerminal",
20-
"internalConsoleOptions": "neverOpen"
15+
"console": "integratedTerminal"
2116
}
2217
]
2318
}

.vscode/settings.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
22
"files.exclude": {
3-
".nyc_output": true,
43
"coverage": true,
54
"cz-adapter/index.js": true
65
},

CHANGELOG.md

Lines changed: 74 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

DONATIONS.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
Any donations would be much appreciated. 😄
44

5+
## Enterprise Users
6+
7+
`eslint-plugin-functional` is available as part of the [Tidelift Subscription](https://tidelift.com/subscription/pkg/npm-eslint-plugin-functional?utm_source=npm-eslint-plugin-functional&utm_medium=referral&utm_campaign=enterprise&utm_term=repo).
8+
59
## Real money
610

711
[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/rebeccastevens)

0 commit comments

Comments
 (0)