Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v5.0.0 #480

Merged
merged 101 commits into from
Jan 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
101 commits
Select commit Hold shift + click to select a range
23b45d2
build!: bump minimum supported version of node to 16.10
RebeccaStevens Sep 14, 2022
405102b
build!: bump minimum supported version of TypeScript to 4.0.2
RebeccaStevens Sep 14, 2022
941e774
feat(type-declaration-immutability): create rule
RebeccaStevens Sep 10, 2022
2552d55
feat(prefer-immutable-types): create rule
RebeccaStevens Sep 14, 2022
d2624cd
docs: document new rules
RebeccaStevens Sep 16, 2022
82816a0
feat(prefer-readonly-type): deprecated this rule
RebeccaStevens Sep 16, 2022
0ebe63e
chore: update default rule to import for the work test file
RebeccaStevens Sep 16, 2022
da2259f
feat(no-method-signature)!: rename to `prefer-property-signatures` & …
RebeccaStevens Sep 16, 2022
f47e9f5
style: disable prefer-readonly-parameter-types
RebeccaStevens Sep 19, 2022
72aa204
feat!: remove `@typescript-eslint/prefer-readonly-parameter-types` fr…
RebeccaStevens Sep 19, 2022
1e7f77a
feat!: split `external-recommended` rulesets into vanilla and typescr…
RebeccaStevens Sep 20, 2022
019035b
refactor: rename ruleset files
RebeccaStevens Sep 24, 2022
c195d8e
feat!: update ruleset configurations
RebeccaStevens Sep 20, 2022
26424e0
feat!: add new strict ruleset and reduce strictness of the recommende…
RebeccaStevens Sep 22, 2022
b8d70a5
style: update linting
RebeccaStevens Sep 24, 2022
4309b08
fixup: update ruleset configurations
RebeccaStevens Sep 24, 2022
7ec10c6
feat!: rename ruleset `no-object-orientation` to `no-other-paradigms`
RebeccaStevens Sep 24, 2022
ebdfaf8
chore: remove "pre" scripts
RebeccaStevens Sep 24, 2022
a77f21f
docs: breakup and update readme
RebeccaStevens Sep 24, 2022
64f74ba
docs: update rule docs
RebeccaStevens Sep 24, 2022
2c36222
refactor: remove useless override
RebeccaStevens Sep 24, 2022
d207496
chore: update is-immutable-type to 1.0
RebeccaStevens Sep 24, 2022
f6296bd
fixup(type-declaration-immutability): make rule more strict by defaul…
RebeccaStevens Sep 25, 2022
86f354b
feat(prefer-property-signatures)!: rename `ignoreIfReadonly` to `igno…
RebeccaStevens Sep 25, 2022
46a8228
docs: tweak common options docs
RebeccaStevens Sep 25, 2022
c0a8699
fixup: tests
RebeccaStevens Sep 25, 2022
044e54b
feat(functional-parameters): add option to ignore lambda function exp…
RebeccaStevens Sep 25, 2022
81178c2
docs: twaek rule docs
RebeccaStevens Sep 25, 2022
dc99b1a
fixup: functional-parameters recommended
RebeccaStevens Sep 25, 2022
91a9424
fixup: type-declaration-immutability recommended
RebeccaStevens Sep 29, 2022
259511d
refactor: use custom merge function to merge configs
RebeccaStevens Sep 29, 2022
bbd798b
feat(no-this-expression)!: remove `no-this-expression` from recommend…
RebeccaStevens Sep 29, 2022
d5e7b42
docs: fix rules gird for functional-parameters
RebeccaStevens Sep 29, 2022
5e2d9c3
fixup(prefer-immutable-parameter-types): add option ignoreInferredTypes
RebeccaStevens Sep 29, 2022
23a8e46
docs: remove *s
RebeccaStevens Sep 29, 2022
d93d5cc
fixup(prefer-immutable-types): change rule name and add a lot more op…
RebeccaStevens Oct 3, 2022
76a8e2d
feat(no-classes)!: rename rule from `no-class`
RebeccaStevens Oct 4, 2022
82b21fa
feat(no-conditional-statements)!: rename rule from `no-conditional-st…
RebeccaStevens Oct 4, 2022
d0f9e98
feat(no-expression-statements)!: rename rule from `no-expression-stat…
RebeccaStevens Oct 4, 2022
683209d
feat(no-loop-statements)!: rename rule from `no-loop-statement`
RebeccaStevens Oct 4, 2022
392f9e8
feat(no-mixed-types)!: rename rule from `no-mixed-type`
RebeccaStevens Oct 4, 2022
10c3bb6
feat(no-this-expressions)!: rename rule from `no-this-expression`
RebeccaStevens Oct 4, 2022
4be92c8
feat(no-throw-statements)!: rename rule from `no-throw-statement`
RebeccaStevens Oct 4, 2022
e88828a
feat(no-try-statements)!: rename rule from `no-try-statement`
RebeccaStevens Oct 4, 2022
b47e983
feat!: rename many of the options
RebeccaStevens Oct 4, 2022
d67ecb8
chore: put breaking marker in the right place
RebeccaStevens Oct 4, 2022
1f307bc
fixup(prefer-immutable-types): fix bugs
RebeccaStevens Oct 4, 2022
be25dc9
chore: update is-immutable-type
RebeccaStevens Oct 4, 2022
d8e84c6
style: update linting
RebeccaStevens Oct 4, 2022
4af92ca
chore: remove double build from verify
RebeccaStevens Oct 4, 2022
7d11128
docs: update readme
RebeccaStevens Oct 5, 2022
fa5cb55
fixup: conditionally import typescript
RebeccaStevens Oct 5, 2022
863b182
style: remove readonly wrappers
RebeccaStevens Oct 5, 2022
3deb6e7
fixup(prefer-immutable-types): adjust error messages
RebeccaStevens Oct 5, 2022
5e36b40
refactor: remove IgnoreInterfacesOption
RebeccaStevens Oct 5, 2022
ff0c6fc
fixup: shouldIgnoreClasses check is class in adition to in class
RebeccaStevens Oct 5, 2022
6bdce09
fixup: merging of configs
RebeccaStevens Oct 5, 2022
143b596
docs: fixup prefer-immutable-types options
RebeccaStevens Oct 9, 2022
972d41b
chore: update is-immutable-type to 1.1.0
RebeccaStevens Oct 12, 2022
712961e
fixup(prefer-immutable-types): ignore type guard parameters
RebeccaStevens Oct 13, 2022
f63f432
fixup(prefer-immutable-types): upgrade is-immutable-type to 1.2.0
RebeccaStevens Oct 16, 2022
9058be5
chore: update deps
RebeccaStevens Oct 16, 2022
651df02
style: update
RebeccaStevens Oct 16, 2022
5b9ec52
chore: update deps
RebeccaStevens Oct 20, 2022
05dc662
chore: update deps
RebeccaStevens Oct 20, 2022
4c57b0a
docs: update ignoreInferredTypes
RebeccaStevens Oct 21, 2022
e81124d
docs(prefer-immutable-types): state what the enforcement options are
RebeccaStevens Nov 8, 2022
8a35e52
feat(prefer-immutable-types): improve ignore options
RebeccaStevens Nov 8, 2022
5e047c2
feat(prefer-immutable-types): add fixer for class properties
RebeccaStevens Nov 14, 2022
195ee1a
feat(prefer-immutable-types): add support for a fixer
RebeccaStevens Nov 15, 2022
32ebf92
docs: fix out of date options
RebeccaStevens Nov 15, 2022
4bba113
fix(prefer-immutable-types): improve the fixer
RebeccaStevens Nov 16, 2022
57a5f48
docs: improve ReadonlyDeep fixer example regex
RebeccaStevens Nov 17, 2022
71d872b
style: update code style/linting
RebeccaStevens Nov 17, 2022
8129ec8
ci: fix running test for TS 4.0.2
RebeccaStevens Nov 17, 2022
64af937
feat(readonly-type): create rule
RebeccaStevens Nov 26, 2022
d94d1fc
chore: bump deps
RebeccaStevens Jan 26, 2023
bf971ab
style: update
RebeccaStevens Jan 26, 2023
7a63d89
fix: drop dependency on tsutils
RebeccaStevens Jan 26, 2023
d0f1d1c
ci: only install semantic release when needed
RebeccaStevens Jan 26, 2023
893ce37
docs: add pnpm install details
RebeccaStevens Jan 26, 2023
57dc699
chore: run renovate monthly
RebeccaStevens Jan 26, 2023
2189397
feat(type-declaration-immutability): add fixer support
RebeccaStevens Jan 26, 2023
ffff8a2
refactor(prefer-immutable-types): reorder functions
RebeccaStevens Jan 26, 2023
1da622d
fix(no-mixed-types): add support for TypeLiteral inside `Readonly<>`
RebeccaStevens Jan 26, 2023
a6a27ff
fix(prefer-immutable-types): fix `string[]` to `readonly string[]`
RebeccaStevens Jan 27, 2023
8dcaa4d
fix(type-declaration-immutability): don't strip whitespace formatting…
RebeccaStevens Jan 28, 2023
97f94ac
chore: update and pin deps
RebeccaStevens Jan 28, 2023
2078b50
docs: add funding links
RebeccaStevens Jan 28, 2023
be97a13
chore: decrease heading level of issue templates
RebeccaStevens Jan 28, 2023
71bb407
docs: reference other doc files in readme
RebeccaStevens Jan 28, 2023
70afc3b
refactor: rename files and clean up imports
RebeccaStevens Jan 28, 2023
2656d28
docs: automate docs with eslint-doc-generator
bmish Jan 28, 2023
1f50625
fix: fix meta data and improve doc generation
RebeccaStevens Jan 29, 2023
191fce8
Merge pull request #504 from bmish/eslint-doc-generator
RebeccaStevens Jan 29, 2023
749f38f
chore: packagejson cleanup
RebeccaStevens Jan 29, 2023
8473743
fix(prefer-tacit): use suggestions instead of a fixer and improve how…
RebeccaStevens Jan 29, 2023
f5bd849
refactor: prefix `inX` with `is`
RebeccaStevens Jan 29, 2023
6c731d9
docs: fixup small wording issues
RebeccaStevens Jan 29, 2023
17cf181
ci: fix build and verify now being different steps
RebeccaStevens Jan 29, 2023
9bc0752
chore: use level 2 heading
RebeccaStevens Jan 29, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 6 additions & 11 deletions .cspell.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.1",
"version": "0.2",
"language": "en",
"ignorePaths": [
"**/coverage/**",
Expand All @@ -21,24 +21,19 @@
"misc",
"filetypes"
],
"import": ["./node_modules/@cspell/dict-cryptocurrencies/cspell-ext.json"],
"ignoreRegExpList": [
"/```[\\w\\W]*?```/",
"/~~~[\\w\\W]*?~~~/",
"/``[\\w\\W]*?``/",
"/`[^`]*`/",
"/\\.\\/docs\\/rules\\/[^.]*.md/",
"/TS[^\\s]+/",
"\\(#.+?\\)"
],
"words": [
"globstar",
"IIFE",
"IIFEs",
"ruleset",
"rulesets",
"typeguard",
"typeguards"
"\\(#.+?\\)",
"// @ts-.*",
"/[A-Za-z0-9]{32,}/"
],
"words": ["litecoin", "globstar", "IIFE", "IIFEs", "ruleset", "rulesets"],
"overrides": [
{
"filename": "**/*.{ts,js}",
Expand Down
12 changes: 12 additions & 0 deletions .eslint-doc-generatorrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
const { format } = require("prettier");

/** @type {import('eslint-doc-generator').GenerateOptions} */
const config = {
configEmoji: [["lite", "☑️"]],
ignoreConfig: ["all", "off"],
ruleDocSectionInclude: ["Rule Details"],
ruleListSplit: "meta.docs.category",
postprocess: (doc) => format(doc, { parser: "markdown" }),
};

module.exports = config;
71 changes: 36 additions & 35 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,29 +29,17 @@
],
"sourceType": "module"
},
"ignorePatterns": ["/build/", "/coverage/", "/lib/", "/**/*.cjs", "/**/*.js"],
"ignorePatterns": [
"/build/",
"/coverage/",
"/lib/",
"/**/*.cjs",
"/**/*.js",
"/src/utils/tsutils.ts"
],
"rules": {
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-unnecessary-condition": "off",
"@typescript-eslint/no-unsafe-argument": "off",
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-unsafe-call": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/no-unsafe-return": "off",
"@typescript-eslint/prefer-readonly-parameter-types": "warn",
"import/no-relative-parent-imports": "error",
"functional/prefer-readonly-type": "off",
"node/no-unsupported-features/es-builtins": "off",
"node/no-unsupported-features/es-syntax": "off",
"promise/prefer-await-to-callbacks": "off",
// only available for node >= 16.8
"unicorn/prefer-at": "off",
// enable once supported in all our supported node versions.
"unicorn/prefer-node-protocol": "off",
// only available for node >= 15.4
"unicorn/prefer-string-replace-all": "off",
// only available for node >= 14.8
"unicorn/prefer-top-level-await": "off"
"functional/prefer-immutable-types": "off",
"import/no-relative-parent-imports": "error"
},
"overrides": [
// Top level files.
Expand All @@ -64,7 +52,7 @@
"files": ["./src/**/*"],
"extends": ["plugin:eslint-plugin/recommended"],
"rules": {
"functional/no-expression-statement": "error"
"functional/no-expression-statements": "error"
}
},
{
Expand All @@ -75,17 +63,37 @@
}
},
{
"files": ["./src/util/typeguard.ts", "./tests/**/*", "./cz-adapter/**/*"],
"files": ["./src/utils/type-guards.ts", "./src/utils/node-types.ts"],
"rules": {
"jsdoc/require-jsdoc": "off"
}
},
{
"files": ["./tests/**/*", "./cz-adapter/**/*"],
"rules": {
"@typescript-eslint/no-unsafe-argument": "off",
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-unsafe-call": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/no-unsafe-return": "off",
"jsdoc/require-jsdoc": "off"
}
},
{
"files": ["./typings/**/*"],
"extends": ["plugin:functional/off"],
"rules": {
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/no-explicit-any": "off"
}
},
// FIXME: This override is defined in the upsteam; it shouldn't need to be redefined here. Why?
{
"files": ["./**/*.md/**"],
"parserOptions": {
"project": null
},
"extends": ["plugin:markdown/recommended", "plugin:functional/off"],
"rules": {
"@typescript-eslint/await-thenable": "off",
"@typescript-eslint/consistent-type-definitions": "off",
Expand All @@ -94,12 +102,15 @@
"@typescript-eslint/naming-convention": "off",
"@typescript-eslint/no-confusing-void-expression": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-floating-promises": "off",
"@typescript-eslint/no-for-in-array": "off",
"@typescript-eslint/no-implied-eval": "off",
"@typescript-eslint/no-misused-promises": "off",
"@typescript-eslint/no-throw-literal": "off",
"@typescript-eslint/no-unnecessary-condition": "off",
"@typescript-eslint/no-unnecessary-type-assertion": "off",
"@typescript-eslint/no-unsafe-argument": "off",
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-unsafe-call": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
Expand All @@ -120,17 +131,6 @@
"@typescript-eslint/strict-boolean-expressions": "off",
"@typescript-eslint/switch-exhaustiveness-check": "off",
"@typescript-eslint/unbound-method": "off",
"functional/functional-parameters": "off",
"functional/immutable-data": "off",
"functional/no-class": "off",
"functional/no-expression-statement": "off",
"functional/no-let": "off",
"functional/no-loop-statement": "off",
"functional/no-return-void": "off",
"functional/no-this-expression": "off",
"functional/no-throw-statement": "off",
"functional/no-try-statement": "off",
"functional/prefer-readonly-type": "off",
"import/no-unresolved": "off",
"init-declarations": "off",
"jsdoc/require-jsdoc": "off",
Expand All @@ -146,6 +146,7 @@
"sonarjs/no-unused-collection": "off",
"unicorn/prefer-optional-catch-binding": "off",
"unicorn/prefer-top-level-await": "off",
"unicorn/switch-case-braces": "off",

"dot-notation": "error",
"no-implied-eval": "error",
Expand Down
3 changes: 3 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
issuehunt: eslint-functional/eslint-plugin-functional
ko_fi: rebeccastevens
custom: https://github.com/eslint-functional/eslint-plugin-functional/blob/main/DONATIONS.md
10 changes: 5 additions & 5 deletions .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,22 @@ labels: 'Type: Bug, Status: Triage'
assignees: ''
---

# Bug Report
## Bug Report

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

## Expected behavior
### Expected behavior

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

## Actual behavior
### Actual behavior

<!-- What actually happened? -->

## Steps to reproduce
### Steps to reproduce

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

## Proposed changes
### Proposed changes

<!-- If you have a proposed change, workaround or fix, describe it here -->
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature-request.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ labels: 'Type: Idea, Status: Triage'
assignees: ''
---

# Suggestion
## Suggestion
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Fixes: #(Issue Number)

# Proposed Changes
## Proposed Changes

<!-- Describe the changes and rationale behind them. -->
8 changes: 6 additions & 2 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["config:base", "helpers:disableTypesNodeMajor"],
"extends": [
"config:base",
"helpers:disableTypesNodeMajor",
"schedule:monthly"
],
"postUpdateOptions": ["yarnDedupeHighest"],
"labels": ["Type: Maintenance", ":blue_heart:"],
"automerge": true,
Expand All @@ -24,7 +28,7 @@
{
"matchManagers": ["npm"],
"matchDepTypes": ["devDependencies"],
"rangeStrategy": "update-lockfile",
"rangeStrategy": "pin",
"semanticCommitType": "chore",
"semanticCommitScope": "dev-deps"
},
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,6 @@ jobs:
- name: Run Linting Checks
run: yarn lint

- name: Check spelling
run: yarn check-spelling

test:
name: "Test - Node: ${{ matrix.node_version }} - TS: ${{ matrix.ts_version }} - OS: ${{ matrix.os }}"
needs: pre_job
Expand All @@ -54,7 +51,6 @@ jobs:
os:
- "ubuntu-latest"
node_version:
- "14"
- "16"
- "18"
ts_version:
Expand Down Expand Up @@ -107,6 +103,8 @@ jobs:
const filename = "./tsconfig.base.json";
const tsConfig = require(filename);
delete tsConfig.compilerOptions.exactOptionalPropertyTypes;
delete tsConfig.compilerOptions.noPropertyAccessFromIndexSignature;
delete tsConfig.compilerOptions.noUncheckedIndexedAccess;
const tsConfigString = JSON.stringify(tsConfig, undefined, 2);
fs.writeFileSync(filename, tsConfigString, { encoding: "utf8" });
console.log("TS Config updated successfully.");
Expand Down
17 changes: 16 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,24 @@ jobs:
- name: Install dependencies
run: yarn install --immutable --ignore-scripts

- name: Build & Verify
- name: Build
run: yarn build

- name: Verify
run: yarn verify

- name: Install semantic release
- run: >
npm install --no-save
@google/semantic-release-replace-plugin
@semantic-release/changelog
@semantic-release/commit-analyzer
@semantic-release/git
@semantic-release/github
@semantic-release/npm
@semantic-release/release-notes-generator
semantic-release

- name: Release
run: npx semantic-release
env:
Expand Down
3 changes: 2 additions & 1 deletion .markdownlint.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"allowed_elements": [
"br",
"div",
"img",
"sub",
"sup",
"span",
Expand Down Expand Up @@ -87,7 +88,7 @@
"MD043": false,
// MD044/proper-names - Proper names should have the correct capitalization
// "MD044": {
// "names": ["JavaScript", "TypeScript", "TSLint", "ESLint"],
// "names": ["JavaScript", "TypeScript"],
// "code_blocks": false
// },
// MD045/no-alt-text - Images should have alternate text (alt text)
Expand Down
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v16.10.0
14 changes: 3 additions & 11 deletions .nycrc
Original file line number Diff line number Diff line change
@@ -1,16 +1,8 @@
{
"extends": "@istanbuljs/nyc-config-typescript",
"include": [
"src/**/*",
"build/src/**/*"
],
"exclude": [
"src/util/conditional-imports/**/*"
],
"reporter": [
"lcov",
"text"
],
"include": ["src/**/*", "build/src/**/*"],
"exclude": ["src/util/conditional-imports/**/*"],
"reporter": ["lcov", "text"],
"check-coverage": false,
"watermarks": {
"lines": [80, 95],
Expand Down
2 changes: 2 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{
"$schema": "http://json.schemastore.org/prettierrc",
"plugins": ["prettier-plugin-packagejson"],
"embeddedLanguageFormatting": "off"
}
8 changes: 6 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,16 @@
".markdownlint.json": "jsonc",
".markdownlintignore": "ignore"
},
"[markdown]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
},
"[json]": {
"editor.defaultFormatter": "vscode.json-language-features",
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
},
"[jsonc]": {
"editor.defaultFormatter": "vscode.json-language-features",
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
},
"[typescript]": {
Expand Down
Loading