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

build(deps-dev): Bump eslint-plugin-jest from 27.9.0 to 28.6.0 - Drop node 16 #1337

Merged
merged 3 commits into from
Jun 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

### Node

* [Node.js](https://nodejs.org/) - v16.0.0+
* [npm](https://www.npmjs.com/) - v8.0.0+
* [Node.js](https://nodejs.org/) - v18.0.0+
* [npm](https://www.npmjs.com/) - v9.0.0+

## Install project dependencies

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ First thing first, let's make sure you have the necessary pre-requisites.

#### Node

* [Node.js](https://nodejs.org/) - v16.0.0+
* [npm](http://npmjs.com) - v8.0.0+
* [Node.js](https://nodejs.org/) - v18.0.0+
* [npm](http://npmjs.com) - v9.0.0+

### Use the cli

Expand Down
5,452 changes: 2,283 additions & 3,169 deletions package-lock.json

Large diffs are not rendered by default.

33 changes: 17 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,30 +58,31 @@
"validate-npm-package-name": "^5.0.1"
},
"devDependencies": {
"@types/jest": "^27.5.0",
"@types/jest": "^29.5.12",
"@types/node": "^20.14.2",
"@typescript-eslint/eslint-plugin": "^5.61.0",
"esbuild": "^0.20.2",
"@typescript-eslint/eslint-plugin": "^7.12.0",
"@typescript-eslint/parser": "^7.12.0",
"esbuild": "^0.21.5",
"esbuild-node-externals": "^1.13.1",
"eslint": "^8.57.0",
"eslint-config-tc": "^23.0.0",
"eslint-config-typescript-tc": "^7.0.0",
"eslint-config-tc": "^26.0.0",
"eslint-config-typescript-tc": "^9.0.0",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jest": "^27.9.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-unicorn": "^52.0.0",
"eslint-plugin-jest": "^28.6.0",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-unicorn": "^53.0.0",
"figures": "^3.2.0",
"jest": "^27.5.1",
"npm-package-json-lint-config-default": "^6.0.0",
"npm-package-json-lint-config-tc": "^7.0.0",
"prettier": "^2.8.8",
"ts-jest": "^27.1.4",
"typescript": "^4.9.5"
"jest": "^29.7.0",
"npm-package-json-lint-config-default": "^7.0.0",
"npm-package-json-lint-config-tc": "^8.0.0",
"prettier": "^3.3.1",
"ts-jest": "^29.1.4",
"typescript": "^5.4.5"
},
"engines": {
"node": ">=16.0.0",
"npm": ">=8.0.0"
"node": ">=18.0.0",
"npm": ">=9.0.0"
},
"license": "MIT"
}
2 changes: 1 addition & 1 deletion src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
default: false,
},
},
}
},
);

const {input, flags} = cli;
Expand All @@ -89,7 +89,7 @@

if (patterns.length === noPatternsProvided) {
debug(`No lint targets provided`);
console.log(chalk.red.bold('No lint targets provided'));

Check warning on line 92 in src/cli.ts

View workflow job for this annotation

GitHub Actions / Lint

Unexpected console statement

const exitCode = flags.allowEmptyTargets ? exitCodes.zeroClean : exitCodes.oneMissingTarget;

Expand Down Expand Up @@ -128,6 +128,6 @@

process.exit(exitCode);
} catch (error) {
console.log(chalk.red.bold(error.message));

Check warning on line 131 in src/cli.ts

View workflow job for this annotation

GitHub Actions / Lint

Unexpected console statement
process.exit(exitCodes.runTimeException);
}
2 changes: 1 addition & 1 deletion src/config/applyOverrides.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const applyOverrides = (cwd: string, filePath: string, rules: any, overri
overrides.forEach((override) => {
const filteredPatterns = override.patterns.filter((pattern) => pattern.length);
const transformedPatterns = filteredPatterns.map((pattern) =>
pattern.endsWith(`/package.json`) ? pattern : `${pattern}/package.json`
pattern.endsWith(`/package.json`) ? pattern : `${pattern}/package.json`,
);

const globFiles = globby.sync(transformedPatterns, {
Expand Down
2 changes: 1 addition & 1 deletion src/config/cosmicConfigTransformer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export const transform = (cwd: any, configBaseDirectory: any, filePathBeingLinte
cwd,
filePathBeingLinted,
configAfterExtends.rules,
configAfterExtends.overrides
configAfterExtends.overrides,
);

return configAfterOverrides;
Expand Down
2 changes: 1 addition & 1 deletion src/linter/linter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ const processPackageJsonObject = (
// TODO: Type
config,
fileName: string,
rules: Rules
rules: Rules,
): PackageJsonFileLintingResult => {
const lintIssues = lint(packageJsonObj, config, rules);
const counts = aggregateCountsPerFile(lintIssues);
Expand Down
4 changes: 2 additions & 2 deletions src/linter/results-helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export const aggregateCountsPerFile = (issues: LintIssue[]): PackageJsonFileAggr
{
errorCount: 0,
warningCount: 0,
}
},
);
};

Expand Down Expand Up @@ -75,5 +75,5 @@ export const aggregateOverallCounts = (results: PackageJsonFileLintingResult[]):
ignoreCount: 0,
errorCount: 0,
warningCount: 0,
}
},
);
2 changes: 1 addition & 1 deletion src/npm-package-json-lint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ export class NpmPackageJsonLint {

if (areRequiredOptionsValid(this.packageJsonObject, this.patterns)) {
throw new Error(
'You must pass npm-package-json-lint a `patterns` glob or a `packageJsonObject` string, though not both.'
'You must pass npm-package-json-lint a `patterns` glob or a `packageJsonObject` string, though not both.',
);
}

Expand Down
4 changes: 2 additions & 2 deletions src/rules/description-format.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const lint = (
// eslint-disable-next-line @typescript-eslint/no-explicit-any
packageJsonData: PackageJson | any,
severity: Severity,
config: Record<string, boolean>
config: Record<string, boolean>,
): LintResult => {
if (!packageJsonData.hasOwnProperty(nodeName)) {
return null;
Expand All @@ -36,7 +36,7 @@ export const lint = (
lintId,
severity,
nodeName,
`The description should start with a capital letter. It currently starts with ${description[0]}.`
`The description should start with a capital letter. It currently starts with ${description[0]}.`,
);
}

Expand Down
6 changes: 3 additions & 3 deletions src/rules/no-absolute-version-dependencies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const lint = (
// eslint-disable-next-line @typescript-eslint/no-explicit-any
packageJsonData: PackageJson | any,
severity: Severity,
config: OptionalObjectRuleConfig
config: OptionalObjectRuleConfig,
): LintResult => {
const auditResult = auditDependenciesForAbsoluteVersion(packageJsonData, nodeName, config);

Expand All @@ -25,8 +25,8 @@ export const lint = (
severity,
nodeName,
`You are using an invalid version range. Please do not use absolute versions. Invalid ${nodeName} include: ${auditResult.dependenciesWithAbsoluteVersion.join(
', '
)}`
', ',
)}`,
);
}

Expand Down
4 changes: 2 additions & 2 deletions src/rules/no-absolute-version-devDependencies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ export const lint = (packageJsonData: PackageJson | any, severity: Severity, con
severity,
nodeName,
`You are using an invalid version range. Please do not use absolute versions. Invalid ${nodeName} include: ${auditResult.dependenciesWithAbsoluteVersion.join(
', '
)}`
', ',
)}`,
);
}

Expand Down
4 changes: 2 additions & 2 deletions src/rules/no-archive-dependencies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ export const lint = (packageJsonData: PackageJson | any, severity: Severity, con
severity,
nodeName,
`You are using ${nodeName} via url to archive file. Please use ${nodeName} from npm. Invalid ${nodeName} include: ${auditResult.dependenciesWithArchiveUrlVersion.join(
', '
)}`
', ',
)}`,
);
}

Expand Down
4 changes: 2 additions & 2 deletions src/rules/no-archive-devDependencies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ export const lint = (packageJsonData: PackageJson | any, severity: Severity, con
severity,
nodeName,
`You are using ${nodeName} via url to archive file. Please use ${nodeName} from npm. Invalid ${nodeName} include: ${auditResult.dependenciesWithArchiveUrlVersion.join(
', '
)}`
', ',
)}`,
);
}

Expand Down
4 changes: 2 additions & 2 deletions src/rules/no-caret-version-dependencies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ export const lint = (packageJsonData: PackageJson | any, severity: Severity, con
severity,
nodeName,
`You are using an invalid version range. Please do not use ^. Invalid ${nodeName} include: ${auditResult.dependenciesWithInvalidVersionRange.join(
', '
)}`
', ',
)}`,
);
}

Expand Down
4 changes: 2 additions & 2 deletions src/rules/no-caret-version-devDependencies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ export const lint = (packageJsonData: PackageJson | any, severity: Severity, con
severity,
nodeName,
`You are using an invalid version range. Please do not use ^. Invalid ${nodeName} include: ${auditResult.dependenciesWithInvalidVersionRange.join(
', '
)}`
', ',
)}`,
);
}

Expand Down
4 changes: 2 additions & 2 deletions src/rules/no-file-dependencies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ export const lint = (packageJsonData: PackageJson | any, severity: Severity, con
severity,
nodeName,
`You are using ${nodeName} via url to local file. Please use ${nodeName} from npm. Invalid ${nodeName} include: ${auditResult.dependenciesWithFileUrlVersion.join(
', '
)}`
', ',
)}`,
);
}

Expand Down
4 changes: 2 additions & 2 deletions src/rules/no-file-devDependencies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ export const lint = (packageJsonData: PackageJson | any, severity: Severity, con
severity,
nodeName,
`You are using ${nodeName} via url to local file. Please use ${nodeName} from npm. Invalid ${nodeName} include: ${auditResult.dependenciesWithFileUrlVersion.join(
', '
)}`
', ',
)}`,
);
}

Expand Down
4 changes: 2 additions & 2 deletions src/rules/no-git-dependencies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ export const lint = (packageJsonData: PackageJson | any, severity: Severity, con
severity,
nodeName,
`You are using ${nodeName} from git repository. Please use ${nodeName} from npm. Invalid ${nodeName} include: ${auditResult.dependenciesWithGitRepositoryVersion.join(
', '
)}`
', ',
)}`,
);
}

Expand Down
4 changes: 2 additions & 2 deletions src/rules/no-git-devDependencies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ export const lint = (packageJsonData: PackageJson | any, severity: Severity, con
severity,
nodeName,
`You are using ${nodeName} from git repository. Please use ${nodeName} from npm. Invalid devDependencies include: ${auditResult.dependenciesWithGitRepositoryVersion.join(
', '
)}`
', ',
)}`,
);
}

Expand Down
2 changes: 1 addition & 1 deletion src/rules/no-repeated-dependencies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const lint = (packageJsonData: PackageJson | any, severity: Severity): Li
lintId,
severity,
`${dependenciesNode}|${devDependenciesNode}`,
`${dependency} exists in both ${dependenciesNode} and ${devDependenciesNode}. Please remove it from one of the dependency lists.`
`${dependency} exists in both ${dependenciesNode} and ${devDependenciesNode}. Please remove it from one of the dependency lists.`,
);
}
}
Expand Down
6 changes: 3 additions & 3 deletions src/rules/no-restricted-dependencies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const lint = (
// eslint-disable-next-line @typescript-eslint/no-explicit-any
packageJsonData: PackageJson | any,
severity: Severity,
invalidDependencies: string[]
invalidDependencies: string[],
): LintIssue | null => {
const auditResult = auditDependenciesWithRestrictedVersion(packageJsonData, nodeName, invalidDependencies);

Expand All @@ -25,8 +25,8 @@ export const lint = (
severity,
nodeName,
`You are using a restricted dependency. Please remove it. Invalid ${nodeName} include: ${auditResult.dependenciesWithRestrictedVersion.join(
', '
)}`
', ',
)}`,
);
}

Expand Down
6 changes: 3 additions & 3 deletions src/rules/no-restricted-devDependencies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const lint = (
// eslint-disable-next-line @typescript-eslint/no-explicit-any
packageJsonData: PackageJson | any,
severity: Severity,
invalidDependencies: string[]
invalidDependencies: string[],
): LintIssue | null => {
const auditResult = auditDependenciesWithRestrictedVersion(packageJsonData, nodeName, invalidDependencies);

Expand All @@ -25,8 +25,8 @@ export const lint = (
severity,
nodeName,
`You are using a restricted dependency. Please remove it. Invalid ${nodeName} include: ${auditResult.dependenciesWithRestrictedVersion.join(
', '
)}`
', ',
)}`,
);
}

Expand Down
6 changes: 3 additions & 3 deletions src/rules/no-restricted-pre-release-dependencies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const lint = (
// eslint-disable-next-line @typescript-eslint/no-explicit-any
packageJsonData: PackageJson | any,
severity: Severity,
invalidPreRelDeps: string[]
invalidPreRelDeps: string[],
): LintIssue | null => {
const auditResult = auditDependenciesWithRestrictedPrereleaseVersion(packageJsonData, nodeName, invalidPreRelDeps);

Expand All @@ -25,8 +25,8 @@ export const lint = (
severity,
nodeName,
`You are using a restricted pre-release dependency. Please remove it. Invalid ${nodeName} include: ${auditResult.dependenciesWithRestrictedPrereleaseVersion.join(
', '
)}`
', ',
)}`,
);
}

Expand Down
6 changes: 3 additions & 3 deletions src/rules/no-restricted-pre-release-devDependencies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const lint = (
// eslint-disable-next-line @typescript-eslint/no-explicit-any
packageJsonData: PackageJson | any,
severity: Severity,
invalidPreRelDeps: string[]
invalidPreRelDeps: string[],
): LintIssue | null => {
const auditResult = auditDependenciesWithRestrictedPrereleaseVersion(packageJsonData, nodeName, invalidPreRelDeps);

Expand All @@ -25,8 +25,8 @@ export const lint = (
severity,
nodeName,
`You are using a restricted pre-release dependency. Please remove it. Invalid ${nodeName} include: ${auditResult.dependenciesWithRestrictedPrereleaseVersion.join(
', '
)}`
', ',
)}`,
);
}

Expand Down
4 changes: 2 additions & 2 deletions src/rules/no-tilde-version-dependencies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ export const lint = (packageJsonData: PackageJson | any, severity: Severity, con
severity,
nodeName,
`You are using an invalid version range. Please do not use ~. Invalid ${nodeName} include: ${auditResult.dependenciesWithInvalidVersionRange.join(
', '
)}`
', ',
)}`,
);
}

Expand Down
4 changes: 2 additions & 2 deletions src/rules/no-tilde-version-devDependencies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ export const lint = (packageJsonData: PackageJson | any, severity: Severity, con
severity,
nodeName,
`You are using an invalid version range. Please do not use ~. Invalid ${nodeName} include: ${auditResult.dependenciesWithInvalidVersionRange.join(
', '
)}`
', ',
)}`,
);
}

Expand Down
4 changes: 2 additions & 2 deletions src/rules/prefer-absolute-version-dependencies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ export const lint = (packageJsonData: PackageJson | any, severity: Severity, con
severity,
nodeName,
`You are using an invalid version range. Please use absolute versions. Invalid ${nodeName} include: ${auditResult.dependenciesWithoutAbsoluteVersion.join(
', '
)}`
', ',
)}`,
);
}

Expand Down
Loading
Loading