Skip to content

Commit dc93fcf

Browse files
Merge pull request #480 from eslint-functional/next
2 parents 35142ba + 9bc0752 commit dc93fcf

File tree

204 files changed

+9508
-5727
lines changed

Some content is hidden

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

204 files changed

+9508
-5727
lines changed

.cspell.json

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "0.1",
2+
"version": "0.2",
33
"language": "en",
44
"ignorePaths": [
55
"**/coverage/**",
@@ -21,24 +21,19 @@
2121
"misc",
2222
"filetypes"
2323
],
24+
"import": ["./node_modules/@cspell/dict-cryptocurrencies/cspell-ext.json"],
2425
"ignoreRegExpList": [
2526
"/```[\\w\\W]*?```/",
2627
"/~~~[\\w\\W]*?~~~/",
2728
"/``[\\w\\W]*?``/",
2829
"/`[^`]*`/",
2930
"/\\.\\/docs\\/rules\\/[^.]*.md/",
3031
"/TS[^\\s]+/",
31-
"\\(#.+?\\)"
32-
],
33-
"words": [
34-
"globstar",
35-
"IIFE",
36-
"IIFEs",
37-
"ruleset",
38-
"rulesets",
39-
"typeguard",
40-
"typeguards"
32+
"\\(#.+?\\)",
33+
"// @ts-.*",
34+
"/[A-Za-z0-9]{32,}/"
4135
],
36+
"words": ["litecoin", "globstar", "IIFE", "IIFEs", "ruleset", "rulesets"],
4237
"overrides": [
4338
{
4439
"filename": "**/*.{ts,js}",

.eslint-doc-generatorrc.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
const { format } = require("prettier");
2+
3+
/** @type {import('eslint-doc-generator').GenerateOptions} */
4+
const config = {
5+
configEmoji: [["lite", "☑️"]],
6+
ignoreConfig: ["all", "off"],
7+
ruleDocSectionInclude: ["Rule Details"],
8+
ruleListSplit: "meta.docs.category",
9+
postprocess: (doc) => format(doc, { parser: "markdown" }),
10+
};
11+
12+
module.exports = config;

.eslintrc.json

Lines changed: 36 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -29,29 +29,17 @@
2929
],
3030
"sourceType": "module"
3131
},
32-
"ignorePatterns": ["/build/", "/coverage/", "/lib/", "/**/*.cjs", "/**/*.js"],
32+
"ignorePatterns": [
33+
"/build/",
34+
"/coverage/",
35+
"/lib/",
36+
"/**/*.cjs",
37+
"/**/*.js",
38+
"/src/utils/tsutils.ts"
39+
],
3340
"rules": {
34-
"@typescript-eslint/explicit-module-boundary-types": "off",
35-
"@typescript-eslint/no-unnecessary-condition": "off",
36-
"@typescript-eslint/no-unsafe-argument": "off",
37-
"@typescript-eslint/no-unsafe-assignment": "off",
38-
"@typescript-eslint/no-unsafe-call": "off",
39-
"@typescript-eslint/no-unsafe-member-access": "off",
40-
"@typescript-eslint/no-unsafe-return": "off",
41-
"@typescript-eslint/prefer-readonly-parameter-types": "warn",
42-
"import/no-relative-parent-imports": "error",
43-
"functional/prefer-readonly-type": "off",
44-
"node/no-unsupported-features/es-builtins": "off",
45-
"node/no-unsupported-features/es-syntax": "off",
46-
"promise/prefer-await-to-callbacks": "off",
47-
// only available for node >= 16.8
48-
"unicorn/prefer-at": "off",
49-
// enable once supported in all our supported node versions.
50-
"unicorn/prefer-node-protocol": "off",
51-
// only available for node >= 15.4
52-
"unicorn/prefer-string-replace-all": "off",
53-
// only available for node >= 14.8
54-
"unicorn/prefer-top-level-await": "off"
41+
"functional/prefer-immutable-types": "off",
42+
"import/no-relative-parent-imports": "error"
5543
},
5644
"overrides": [
5745
// Top level files.
@@ -64,7 +52,7 @@
6452
"files": ["./src/**/*"],
6553
"extends": ["plugin:eslint-plugin/recommended"],
6654
"rules": {
67-
"functional/no-expression-statement": "error"
55+
"functional/no-expression-statements": "error"
6856
}
6957
},
7058
{
@@ -75,17 +63,37 @@
7563
}
7664
},
7765
{
78-
"files": ["./src/util/typeguard.ts", "./tests/**/*", "./cz-adapter/**/*"],
66+
"files": ["./src/utils/type-guards.ts", "./src/utils/node-types.ts"],
7967
"rules": {
8068
"jsdoc/require-jsdoc": "off"
8169
}
8270
},
71+
{
72+
"files": ["./tests/**/*", "./cz-adapter/**/*"],
73+
"rules": {
74+
"@typescript-eslint/no-unsafe-argument": "off",
75+
"@typescript-eslint/no-unsafe-assignment": "off",
76+
"@typescript-eslint/no-unsafe-call": "off",
77+
"@typescript-eslint/no-unsafe-member-access": "off",
78+
"@typescript-eslint/no-unsafe-return": "off",
79+
"jsdoc/require-jsdoc": "off"
80+
}
81+
},
82+
{
83+
"files": ["./typings/**/*"],
84+
"extends": ["plugin:functional/off"],
85+
"rules": {
86+
"@typescript-eslint/no-unused-vars": "off",
87+
"@typescript-eslint/no-explicit-any": "off"
88+
}
89+
},
8390
// FIXME: This override is defined in the upsteam; it shouldn't need to be redefined here. Why?
8491
{
8592
"files": ["./**/*.md/**"],
8693
"parserOptions": {
8794
"project": null
8895
},
96+
"extends": ["plugin:markdown/recommended", "plugin:functional/off"],
8997
"rules": {
9098
"@typescript-eslint/await-thenable": "off",
9199
"@typescript-eslint/consistent-type-definitions": "off",
@@ -94,12 +102,15 @@
94102
"@typescript-eslint/naming-convention": "off",
95103
"@typescript-eslint/no-confusing-void-expression": "off",
96104
"@typescript-eslint/no-empty-function": "off",
105+
"@typescript-eslint/no-explicit-any": "off",
97106
"@typescript-eslint/no-floating-promises": "off",
98107
"@typescript-eslint/no-for-in-array": "off",
99108
"@typescript-eslint/no-implied-eval": "off",
100109
"@typescript-eslint/no-misused-promises": "off",
101110
"@typescript-eslint/no-throw-literal": "off",
111+
"@typescript-eslint/no-unnecessary-condition": "off",
102112
"@typescript-eslint/no-unnecessary-type-assertion": "off",
113+
"@typescript-eslint/no-unsafe-argument": "off",
103114
"@typescript-eslint/no-unsafe-assignment": "off",
104115
"@typescript-eslint/no-unsafe-call": "off",
105116
"@typescript-eslint/no-unsafe-member-access": "off",
@@ -120,17 +131,6 @@
120131
"@typescript-eslint/strict-boolean-expressions": "off",
121132
"@typescript-eslint/switch-exhaustiveness-check": "off",
122133
"@typescript-eslint/unbound-method": "off",
123-
"functional/functional-parameters": "off",
124-
"functional/immutable-data": "off",
125-
"functional/no-class": "off",
126-
"functional/no-expression-statement": "off",
127-
"functional/no-let": "off",
128-
"functional/no-loop-statement": "off",
129-
"functional/no-return-void": "off",
130-
"functional/no-this-expression": "off",
131-
"functional/no-throw-statement": "off",
132-
"functional/no-try-statement": "off",
133-
"functional/prefer-readonly-type": "off",
134134
"import/no-unresolved": "off",
135135
"init-declarations": "off",
136136
"jsdoc/require-jsdoc": "off",
@@ -146,6 +146,7 @@
146146
"sonarjs/no-unused-collection": "off",
147147
"unicorn/prefer-optional-catch-binding": "off",
148148
"unicorn/prefer-top-level-await": "off",
149+
"unicorn/switch-case-braces": "off",
149150

150151
"dot-notation": "error",
151152
"no-implied-eval": "error",

.github/FUNDING.yml

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

.github/ISSUE_TEMPLATE/bug-report.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,22 @@ labels: 'Type: Bug, Status: Triage'
66
assignees: ''
77
---
88

9-
# Bug Report
9+
## Bug Report
1010

1111
<!-- Why the issue was filed? -->
1212

13-
## Expected behavior
13+
### Expected behavior
1414

1515
<!-- What you expected to happen? -->
1616

17-
## Actual behavior
17+
### Actual behavior
1818

1919
<!-- What actually happened? -->
2020

21-
## Steps to reproduce
21+
### Steps to reproduce
2222

2323
<!-- How can someone else make/see it happen -->
2424

25-
## Proposed changes
25+
### Proposed changes
2626

2727
<!-- If you have a proposed change, workaround or fix, describe it here -->

.github/ISSUE_TEMPLATE/feature-request.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ labels: 'Type: Idea, Status: Triage'
66
assignees: ''
77
---
88

9-
# Suggestion
9+
## Suggestion

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Fixes: #(Issue Number)
22

3-
# Proposed Changes
3+
## Proposed Changes
44

55
<!-- Describe the changes and rationale behind them. -->

.github/renovate.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
{
22
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3-
"extends": ["config:base", "helpers:disableTypesNodeMajor"],
3+
"extends": [
4+
"config:base",
5+
"helpers:disableTypesNodeMajor",
6+
"schedule:monthly"
7+
],
48
"postUpdateOptions": ["yarnDedupeHighest"],
59
"labels": ["Type: Maintenance", ":blue_heart:"],
610
"automerge": true,
@@ -24,7 +28,7 @@
2428
{
2529
"matchManagers": ["npm"],
2630
"matchDepTypes": ["devDependencies"],
27-
"rangeStrategy": "update-lockfile",
31+
"rangeStrategy": "pin",
2832
"semanticCommitType": "chore",
2933
"semanticCommitScope": "dev-deps"
3034
},

.github/workflows/ci.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,6 @@ jobs:
4141
- name: Run Linting Checks
4242
run: yarn lint
4343

44-
- name: Check spelling
45-
run: yarn check-spelling
46-
4744
test:
4845
name: "Test - Node: ${{ matrix.node_version }} - TS: ${{ matrix.ts_version }} - OS: ${{ matrix.os }}"
4946
needs: pre_job
@@ -54,7 +51,6 @@ jobs:
5451
os:
5552
- "ubuntu-latest"
5653
node_version:
57-
- "14"
5854
- "16"
5955
- "18"
6056
ts_version:
@@ -107,6 +103,8 @@ jobs:
107103
const filename = "./tsconfig.base.json";
108104
const tsConfig = require(filename);
109105
delete tsConfig.compilerOptions.exactOptionalPropertyTypes;
106+
delete tsConfig.compilerOptions.noPropertyAccessFromIndexSignature;
107+
delete tsConfig.compilerOptions.noUncheckedIndexedAccess;
110108
const tsConfigString = JSON.stringify(tsConfig, undefined, 2);
111109
fs.writeFileSync(filename, tsConfigString, { encoding: "utf8" });
112110
console.log("TS Config updated successfully.");

.github/workflows/release.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,24 @@ jobs:
2424
- name: Install dependencies
2525
run: yarn install --immutable --ignore-scripts
2626

27-
- name: Build & Verify
27+
- name: Build
28+
run: yarn build
29+
30+
- name: Verify
2831
run: yarn verify
2932

33+
- name: Install semantic release
34+
- run: >
35+
npm install --no-save
36+
@google/semantic-release-replace-plugin
37+
@semantic-release/changelog
38+
@semantic-release/commit-analyzer
39+
@semantic-release/git
40+
@semantic-release/github
41+
@semantic-release/npm
42+
@semantic-release/release-notes-generator
43+
semantic-release
44+
3045
- name: Release
3146
run: npx semantic-release
3247
env:

0 commit comments

Comments
 (0)