Skip to content

Commit

Permalink
chore(deps): bump dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
deini committed Sep 5, 2024
1 parent 944ad9c commit 41a0f99
Show file tree
Hide file tree
Showing 11 changed files with 448 additions and 496 deletions.
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ commands:
parameters:
cache-version:
type: string
default: v1
default: v1.1
description: Change the cache version if you need to clear the cache for any reason.

steps:
Expand Down Expand Up @@ -58,7 +58,7 @@ jobs:
steps:
- checkout
- node/install-yarn:
version: 1.22.10
version: 1.22.22
- run: rm yarn.lock
- run: yarn install
- run: yarn run test
Expand Down
19 changes: 5 additions & 14 deletions packages/eslint-config/configs/prettier.js
Original file line number Diff line number Diff line change
@@ -1,29 +1,20 @@
const { basename, dirname } = require('path');
const { resolveConfigFile } = require('prettier');
const path = require('path');

const defaultConfig = require('../prettier.config');

function getRules() {
const prettierConfigFile = resolveConfigFile.sync(process.cwd());
const hasLocalConfig = prettierConfigFile ? dirname(prettierConfigFile) === process.cwd() : false;
const pkgPath = path.resolve(process.cwd(), 'package.json');
// eslint-disable-next-line import/no-dynamic-require
const pkg = require(pkgPath);

if (!hasLocalConfig) {
if (pkg.prettier !== '@bigcommerce/eslint-config/prettier') {
throw new Error(`
=================================================================================
Please add "prettier": "@bigcommerce/eslint-config/prettier" to your package.json
=================================================================================
`);
}

if (basename(prettierConfigFile) !== 'package.json') {
throw new Error(`
=================================================================================
Please add "prettier": "@bigcommerce/eslint-config/prettier" to your package.json
and remove any other prettier config file
=================================================================================
`);
}

return {
curly: ['error', 'all'],
'prettier/prettier': ['warn', defaultConfig, { usePrettierrc: false }],
Expand Down
10 changes: 5 additions & 5 deletions packages/eslint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,21 @@
"@bigcommerce/eslint-plugin": "^1.3.0",
"@rushstack/eslint-patch": "^1.1.3",
"@stylistic/eslint-plugin": "^2.1.0",
"@typescript-eslint/eslint-plugin": "^7.8.0",
"@typescript-eslint/parser": "^7.8.0",
"@typescript-eslint/eslint-plugin": "^8.4.0",
"@typescript-eslint/parser": "^8.4.0",
"eslint-config-prettier": "^9.1.0",
"eslint-import-resolver-typescript": "^3.5.2",
"eslint-plugin-gettext": "^1.2.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-jest": "^28.4.0",
"eslint-plugin-jest-formatting": "^3.1.0",
"eslint-plugin-jsdoc": "^48.0.2",
"eslint-plugin-jsdoc": "^50.2.2",
"eslint-plugin-jsx-a11y": "^6.5.1",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-react": "^7.29.4",
"eslint-plugin-react-hooks": "^4.5.0",
"eslint-plugin-switch-case": "^1.1.2",
"prettier": "^2.8.8"
"prettier": "^3.3.3"
},
"devDependencies": {
"react": "^18.3.1"
Expand Down
41 changes: 32 additions & 9 deletions packages/eslint-config/test/__snapshots__/d.ts.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,6 @@ exports[`keeps rules stable 1`] = `
"@typescript-eslint/ban-tslint-comment": [
"error",
],
"@typescript-eslint/ban-types": [
"error",
],
"@typescript-eslint/block-spacing": [
"off",
],
Expand Down Expand Up @@ -336,6 +333,9 @@ exports[`keeps rules stable 1`] = `
"ignoreArrowShorthand": true,
},
],
"@typescript-eslint/no-deprecated": [
"error",
],
"@typescript-eslint/no-duplicate-enum-values": [
"error",
],
Expand All @@ -348,7 +348,7 @@ exports[`keeps rules stable 1`] = `
"@typescript-eslint/no-empty-function": [
"error",
],
"@typescript-eslint/no-empty-interface": [
"@typescript-eslint/no-empty-object-type": [
"error",
],
"@typescript-eslint/no-explicit-any": [
Expand Down Expand Up @@ -381,9 +381,6 @@ exports[`keeps rules stable 1`] = `
"@typescript-eslint/no-invalid-void-type": [
"error",
],
"@typescript-eslint/no-loss-of-precision": [
"error",
],
"@typescript-eslint/no-meaningless-void-operator": [
"error",
],
Expand Down Expand Up @@ -419,6 +416,9 @@ exports[`keeps rules stable 1`] = `
"@typescript-eslint/no-redundant-type-constituents": [
"error",
],
"@typescript-eslint/no-require-imports": [
"error",
],
"@typescript-eslint/no-shadow": [
"error",
{
Expand Down Expand Up @@ -446,6 +446,9 @@ exports[`keeps rules stable 1`] = `
"@typescript-eslint/no-unnecessary-type-constraint": [
"error",
],
"@typescript-eslint/no-unnecessary-type-parameters": [
"error",
],
"@typescript-eslint/no-unsafe-argument": [
"error",
],
Expand All @@ -461,12 +464,18 @@ exports[`keeps rules stable 1`] = `
"@typescript-eslint/no-unsafe-enum-comparison": [
"error",
],
"@typescript-eslint/no-unsafe-function-type": [
"error",
],
"@typescript-eslint/no-unsafe-member-access": [
"error",
],
"@typescript-eslint/no-unsafe-return": [
"error",
],
"@typescript-eslint/no-unsafe-unary-minus": [
"error",
],
"@typescript-eslint/no-unused-expressions": [
"error",
],
Expand All @@ -485,7 +494,7 @@ exports[`keeps rules stable 1`] = `
"@typescript-eslint/no-useless-constructor": [
"error",
],
"@typescript-eslint/no-var-requires": [
"@typescript-eslint/no-wrapper-object-types": [
"error",
],
"@typescript-eslint/non-nullable-type-assertion-style": [
Expand All @@ -500,6 +509,9 @@ exports[`keeps rules stable 1`] = `
"@typescript-eslint/prefer-as-const": [
"error",
],
"@typescript-eslint/prefer-find": [
"error",
],
"@typescript-eslint/prefer-for-of": [
"error",
],
Expand Down Expand Up @@ -527,6 +539,9 @@ exports[`keeps rules stable 1`] = `
"@typescript-eslint/prefer-reduce-type-parameter": [
"error",
],
"@typescript-eslint/prefer-regexp-exec": [
"error",
],
"@typescript-eslint/prefer-return-this-type": [
"error",
],
Expand Down Expand Up @@ -557,6 +572,7 @@ exports[`keeps rules stable 1`] = `
],
"@typescript-eslint/return-await": [
"error",
"error-handling-correctness-only",
],
"@typescript-eslint/semi": [
"off",
Expand Down Expand Up @@ -1348,7 +1364,7 @@ exports[`keeps rules stable 1`] = `
"error",
],
"no-loss-of-precision": [
"off",
"error",
],
"no-misleading-character-class": [
"error",
Expand Down Expand Up @@ -1576,6 +1592,9 @@ exports[`keeps rules stable 1`] = `
"error",
"except-parens",
],
"no-return-await": [
"off",
],
"no-script-url": [
"error",
],
Expand Down Expand Up @@ -2285,6 +2304,8 @@ exports[`keeps rules stable 1`] = `
".tsx",
".js",
".jsx",
".mjs",
".cjs",
],
"import/external-module-folders": [
"node_modules",
Expand All @@ -2307,6 +2328,8 @@ exports[`keeps rules stable 1`] = `
".tsx",
".js",
".jsx",
".mjs",
".cjs",
],
},
"typescript": {
Expand Down
41 changes: 32 additions & 9 deletions packages/eslint-config/test/__snapshots__/ts.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,6 @@ exports[`keeps rules stable 1`] = `
"@typescript-eslint/ban-tslint-comment": [
"error",
],
"@typescript-eslint/ban-types": [
"error",
],
"@typescript-eslint/block-spacing": [
"off",
],
Expand Down Expand Up @@ -335,6 +332,9 @@ exports[`keeps rules stable 1`] = `
"ignoreArrowShorthand": true,
},
],
"@typescript-eslint/no-deprecated": [
"error",
],
"@typescript-eslint/no-duplicate-enum-values": [
"error",
],
Expand All @@ -347,7 +347,7 @@ exports[`keeps rules stable 1`] = `
"@typescript-eslint/no-empty-function": [
"error",
],
"@typescript-eslint/no-empty-interface": [
"@typescript-eslint/no-empty-object-type": [
"error",
],
"@typescript-eslint/no-explicit-any": [
Expand Down Expand Up @@ -380,9 +380,6 @@ exports[`keeps rules stable 1`] = `
"@typescript-eslint/no-invalid-void-type": [
"error",
],
"@typescript-eslint/no-loss-of-precision": [
"error",
],
"@typescript-eslint/no-meaningless-void-operator": [
"error",
],
Expand Down Expand Up @@ -418,6 +415,9 @@ exports[`keeps rules stable 1`] = `
"@typescript-eslint/no-redundant-type-constituents": [
"error",
],
"@typescript-eslint/no-require-imports": [
"error",
],
"@typescript-eslint/no-shadow": [
"error",
{
Expand Down Expand Up @@ -445,6 +445,9 @@ exports[`keeps rules stable 1`] = `
"@typescript-eslint/no-unnecessary-type-constraint": [
"error",
],
"@typescript-eslint/no-unnecessary-type-parameters": [
"error",
],
"@typescript-eslint/no-unsafe-argument": [
"error",
],
Expand All @@ -460,12 +463,18 @@ exports[`keeps rules stable 1`] = `
"@typescript-eslint/no-unsafe-enum-comparison": [
"error",
],
"@typescript-eslint/no-unsafe-function-type": [
"error",
],
"@typescript-eslint/no-unsafe-member-access": [
"error",
],
"@typescript-eslint/no-unsafe-return": [
"error",
],
"@typescript-eslint/no-unsafe-unary-minus": [
"error",
],
"@typescript-eslint/no-unused-expressions": [
"error",
],
Expand All @@ -484,7 +493,7 @@ exports[`keeps rules stable 1`] = `
"@typescript-eslint/no-useless-constructor": [
"error",
],
"@typescript-eslint/no-var-requires": [
"@typescript-eslint/no-wrapper-object-types": [
"error",
],
"@typescript-eslint/non-nullable-type-assertion-style": [
Expand All @@ -499,6 +508,9 @@ exports[`keeps rules stable 1`] = `
"@typescript-eslint/prefer-as-const": [
"error",
],
"@typescript-eslint/prefer-find": [
"error",
],
"@typescript-eslint/prefer-for-of": [
"error",
],
Expand Down Expand Up @@ -526,6 +538,9 @@ exports[`keeps rules stable 1`] = `
"@typescript-eslint/prefer-reduce-type-parameter": [
"error",
],
"@typescript-eslint/prefer-regexp-exec": [
"error",
],
"@typescript-eslint/prefer-return-this-type": [
"error",
],
Expand Down Expand Up @@ -556,6 +571,7 @@ exports[`keeps rules stable 1`] = `
],
"@typescript-eslint/return-await": [
"error",
"error-handling-correctness-only",
],
"@typescript-eslint/semi": [
"off",
Expand Down Expand Up @@ -1347,7 +1363,7 @@ exports[`keeps rules stable 1`] = `
"error",
],
"no-loss-of-precision": [
"off",
"error",
],
"no-misleading-character-class": [
"error",
Expand Down Expand Up @@ -1575,6 +1591,9 @@ exports[`keeps rules stable 1`] = `
"error",
"except-parens",
],
"no-return-await": [
"off",
],
"no-script-url": [
"error",
],
Expand Down Expand Up @@ -2284,6 +2303,8 @@ exports[`keeps rules stable 1`] = `
".tsx",
".js",
".jsx",
".mjs",
".cjs",
],
"import/external-module-folders": [
"node_modules",
Expand All @@ -2306,6 +2327,8 @@ exports[`keeps rules stable 1`] = `
".tsx",
".js",
".jsx",
".mjs",
".cjs",
],
},
"typescript": {
Expand Down
Loading

0 comments on commit 41a0f99

Please sign in to comment.