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

Feat/version updates #37

Merged
merged 3 commits into from
Nov 6, 2023
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
7 changes: 7 additions & 0 deletions .changeset/honest-lemons-glow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'eslint-config-widen': major
'eslint-plugin-widen': major
---

Updates all versions to latest with major version updates for @typescript-eslint
and eslint-plugin-jest
786 changes: 0 additions & 786 deletions .yarn/releases/yarn-3.2.1.cjs

This file was deleted.

874 changes: 874 additions & 0 deletions .yarn/releases/yarn-3.6.4.cjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ plugins:
- path: .yarn/plugins/@yarnpkg/plugin-outdated.cjs
spec: "https://mskelton.dev/yarn-outdated/v3"

yarnPath: .yarn/releases/yarn-3.2.1.cjs
yarnPath: .yarn/releases/yarn-3.6.4.cjs
24 changes: 12 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"private": true,
"author": "Widen",
"license": "ISC",
"packageManager": "yarn@3.2.1",
"packageManager": "yarn@3.6.4",
"repository": "github:Widen/eslint-config",
"workspaces": [
"packages/*"
Expand All @@ -16,17 +16,17 @@
"ts": "tsc -b"
},
"devDependencies": {
"@babel/core": "^7.22.9",
"@babel/preset-env": "^7.22.9",
"@babel/preset-typescript": "^7.22.5",
"@babel/core": "^7.23.2",
"@babel/preset-env": "^7.23.2",
"@babel/preset-typescript": "^7.23.2",
"@changesets/cli": "^2.26.2",
"@types/jest": "^28.1.1",
"@typescript-eslint/eslint-plugin": "^5.27.1",
"@typescript-eslint/parser": "^5.27.1",
"eslint": "^8.44.0",
"eslint-plugin-sort": "^2.10.0",
"jest": "^28.1.1",
"prettier": "^2.6.2",
"typescript": "^4.7.3"
"@types/jest": "^29.5.7",
"@typescript-eslint/eslint-plugin": "^6.9.1",
"@typescript-eslint/parser": "^6.9.1",
"eslint": "^8.52.0",
"eslint-plugin-sort": "^2.11.0",
"jest": "^29.7.0",
"prettier": "^3.0.3",
"typescript": "^5.2.2"
}
}
42 changes: 21 additions & 21 deletions packages/eslint-config-widen/package.json
Original file line number Diff line number Diff line change
@@ -1,36 +1,30 @@
{
"name": "eslint-config-widen",
"version": "2.0.1",
"description": "Widen's shared ESLint config.",
"author": "Widen",
"license": "ISC",
"repository": {
"type": "git",
"url": "https://github.com/Widen/eslint-config",
"directory": "packages/eslint-config-widen"
"dependencies": {
"eslint-config-prettier": "^9.0.0"
},
"homepage": "https://github.com/Widen/eslint-config/tree/master/packages/eslint-config-widen#readme",
"files": [
"lib"
],
"description": "Widen's shared ESLint config.",
"exports": {
".": "./lib/index.js",
"./jest": "./lib/jest.js",
"./playwright": "./lib/playwright.js",
"./react": "./lib/react.js",
"./typescript": "./lib/typescript.js"
},
"dependencies": {
"eslint-config-prettier": "^8.8.0"
},
"files": [
"lib"
],
"homepage": "https://github.com/Widen/eslint-config/tree/master/packages/eslint-config-widen#readme",
"license": "ISC",
"name": "eslint-config-widen",
"peerDependencies": {
"@babel/eslint-parser": "^7.16.5",
"@typescript-eslint/eslint-plugin": "^5.7.0",
"@typescript-eslint/parser": "^5.7.0",
"@babel/eslint-parser": "^7.22.15",
"@typescript-eslint/eslint-plugin": "^6.9.1",
"@typescript-eslint/parser": "^6.9.1",
"eslint": ">= 8",
"eslint-plugin-jest": ">= 25",
"eslint-plugin-jest": ">= 27",
"eslint-plugin-jsx-a11y": ">= 6",
"eslint-plugin-playwright": ">=0.12.0",
"eslint-plugin-playwright": ">=0.16.0",
"eslint-plugin-react": ">= 7",
"eslint-plugin-react-hooks": ">= 4",
"eslint-plugin-sort": ">= 2",
Expand Down Expand Up @@ -58,5 +52,11 @@
"eslint-plugin-react-hooks": {
"optional": true
}
}
},
"repository": {
"directory": "packages/eslint-config-widen",
"type": "git",
"url": "https://github.com/Widen/eslint-config"
},
"version": "2.0.1"
}
2 changes: 1 addition & 1 deletion packages/eslint-plugin-widen/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Add the following to your `.eslintrc` file.
✔: Enabled in the `recommended` configuration.\
🔧: Fixable with [`eslint --fix`](https://eslint.org/docs/user-guide/command-line-interface#fixing-problems).

| ✔ | 🔧 | Rule | Description |
| ✔ | 🔧 | Rule | Description |
| :-: | :-: | -------------------------------------------- | ------------------------------------------------------------------------------------------- |
| | 🔧 | [widen/jsx-fragments](docs/jsx-fragments.md) | Enforce usage of JSX fragment longhand to allow for compatibility with Emotion. |
| | 🔧 | [widen/jsx-import](docs/jsx-import.md) | Enforces all files to use the `jsx` pragma from `@emotion/react` when using the `css` prop. |
30 changes: 15 additions & 15 deletions packages/eslint-plugin-widen/package.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
{
"name": "eslint-plugin-widen",
"version": "1.1.1",
"description": "Widen's own ESLint plugin containing custom lint rules for our code.",
"author": "Widen",
"license": "ISC",
"repository": {
"type": "git",
"url": "https://github.com/Widen/eslint-config",
"directory": "packages/eslint-plugin-widen"
"description": "Widen's own ESLint plugin containing custom lint rules for our code.",
"devDependencies": {
"@types/eslint": "^8.44.6",
"@types/estree-jsx": "^1.0.2",
"eslint": "^8.52.0",
"tsheredoc": "^1.0.1"
},
"homepage": "https://github.com/Widen/eslint-config/tree/master/packages/eslint-plugin-widen#readme",
"exports": "./lib/index.js",
"files": [
"lib"
],
"homepage": "https://github.com/Widen/eslint-config/tree/master/packages/eslint-plugin-widen#readme",
"license": "ISC",
"name": "eslint-plugin-widen",
"peerDependencies": {
"eslint": ">= 8"
},
"devDependencies": {
"@types/eslint": "^8.44.0",
"@types/estree-jsx": "^0.0.1",
"eslint": "^8.44.0",
"tsheredoc": "^1.0.1"
}
"repository": {
"directory": "packages/eslint-plugin-widen",
"type": "git",
"url": "https://github.com/Widen/eslint-config"
},
"version": "1.1.1"
}
8 changes: 4 additions & 4 deletions packages/eslint-plugin-widen/src/rules/jsx-fragments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { JSXFragment } from 'estree-jsx'
import { docsURL } from '../utils'

const isImportDeclaration = (
node: ESTree.Node
node: ESTree.Node,
): node is ESTree.ImportDeclaration => node.type === 'ImportDeclaration'

export default {
Expand Down Expand Up @@ -46,11 +46,11 @@ export default {
return [
fixer.replaceText(
fragment.openingFragment as unknown as ESTree.Node,
`<${tag}>`
`<${tag}>`,
),
fixer.replaceText(
fragment.closingFragment as unknown as ESTree.Node,
`</${tag}>`
`</${tag}>`,
),
]
},
Expand All @@ -74,7 +74,7 @@ export default {
fix(fixer) {
return fixer.insertTextAfter(
node.specifiers[node.specifiers.length - 1],
', Fragment'
', Fragment',
)
},
messageId: 'missingImport',
Expand Down
6 changes: 3 additions & 3 deletions packages/eslint-plugin-widen/src/rules/jsx-import.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ function addJsxImport(fixer: Rule.RuleFixer, node: ESTree.ImportDeclaration) {

return fixer.insertTextAfter(
specifier,
specifier.type === 'ImportSpecifier' ? ', jsx' : ', { jsx }'
specifier.type === 'ImportSpecifier' ? ', jsx' : ', { jsx }',
)
}

function removeReactImport(
source: SourceCode,
fixer: Rule.RuleFixer,
node: ESTree.ImportDeclaration
node: ESTree.ImportDeclaration,
) {
const specifier = node.specifiers.find((spec) => spec.local.name === 'React')
if (!specifier) return []
Expand All @@ -52,7 +52,7 @@ function applyRemainingFix(
source: SourceCode,
fixer: Rule.RuleFixer,
hasPragma: boolean,
emotionReactImport: ESTree.ImportDeclaration | null
emotionReactImport: ESTree.ImportDeclaration | null,
) {
const fix =
(hasPragma ? '' : '/** @jsx jsx */\n') +
Expand Down
4 changes: 2 additions & 2 deletions packages/eslint-plugin-widen/src/rules/patterns-18.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ const oldVariables = new Set([
function reportCssVariable(
context: Rule.RuleContext,
node: ESTree.Node,
value: string
value: string,
) {
const regex = /var\((--[a-z-]+)(,.*)?\)/g
const matches = value.matchAll(regex)
Expand Down Expand Up @@ -170,7 +170,7 @@ export default {
fix: (fixer) =>
fixer.replaceText(
attribute as unknown as ESTree.Node,
'status="' + statusMap[color] + '"'
'status="' + statusMap[color] + '"',
),
messageId: 'statusProp',
node,
Expand Down
Loading
Loading