Skip to content

Commit

Permalink
⬆️ (deps) typescript-eslint@8.0.0 🧨 [skip ci] (#1584)
Browse files Browse the repository at this point in the history
  • Loading branch information
renovate[bot] committed Aug 1, 2024
1 parent f412a76 commit b6b0fe8
Show file tree
Hide file tree
Showing 13 changed files with 172 additions and 108 deletions.
6 changes: 1 addition & 5 deletions .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,7 @@
],
"groupName": "lint 📏 ",
"groupSlug": "lint",
"matchPackageNames": [
"@babel/eslint-parser",
"@typescript-eslint/parser",
"prettier"
],
"matchPackageNames": ["@babel/eslint-parser", "prettier"],
"matchPackagePatterns": ["^@eslint", "^eslint"]
},
{
Expand Down
1 change: 0 additions & 1 deletion config/eslint-config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ Custom `eslint-config` setup that can be extended and incorporates:

- `@babel/eslint-parser`
- `@eslint/*`
- `@typescript-eslint/parser`
- `eslint`
- `eslint-config-next`
- `eslint-config-prettier`
Expand Down
3 changes: 1 addition & 2 deletions config/eslint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
"@eslint/eslintrc": "3.1.0",
"@eslint/js": "9.8.0",
"@next/eslint-plugin-next": "14.2.5",
"@typescript-eslint/parser": "7.18.0",
"eslint": "9.8.0",
"eslint-config-next": "14.2.5",
"eslint-config-turbo": "2.0.11",
Expand All @@ -50,7 +49,7 @@
"eslint-plugin-tailwindcss": "3.17.4",
"eslint-plugin-testing-library": "6.2.2",
"eslint-plugin-turbo": "2.0.11",
"typescript-eslint": "7.18.0"
"typescript-eslint": "8.0.0"
},
"devDependencies": {
"@types/eslint__js": "8.42.3",
Expand Down
16 changes: 3 additions & 13 deletions config/eslint-config/src/typescript.js
Original file line number Diff line number Diff line change
@@ -1,27 +1,17 @@
import parserTypescript from '@typescript-eslint/parser'
import pluginImportX from 'eslint-plugin-import-x'
import tseslint from 'typescript-eslint'

import { RULES } from './_lib.js'
import configBase from './base.js'

/**
* @hack(typescript-eslint) w/o run into following error
* b/c parser is passed as meta instead of explicit (?):
*
* Error while loading rule '@typescript-eslint/await-thenable':
* You have used a rule which requires parserServices to be generated.
* You must therefore provide a value for the "parserOptions.project"
* property for @typescript-eslint/parser.
*/
let recommendedTypeChecked = []
tseslint.configs.recommendedTypeChecked.map((obj) => {
if (obj.name === 'typescript-eslint/base') {
return {
...obj,
languageOptions: {
...obj.languageOptions,
parser: parserTypescript,
parser: tseslint.parser,
},
}
}
Expand All @@ -34,7 +24,7 @@ tseslint.configs.stylisticTypeChecked.map((obj) => {
...obj,
languageOptions: {
...obj.languageOptions,
parser: parserTypescript,
parser: tseslint.parser,
},
}
}
Expand All @@ -54,7 +44,7 @@ const configTypescript = [
{
files: ['**/*.ts?(x)'],
languageOptions: {
parser: parserTypescript,
parser: tseslint.parser,
parserOptions: {
allowAutomaticSingleRunInference: true,
ecmaFeatures: {
Expand Down
3 changes: 3 additions & 0 deletions config/lint-staged/src/lint-staged.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const config = (files) => {
)
if (filesPrettier.length) {
const filenames = escapedFileNames(filesPrettier)
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
isCI
? lintStaged.push(`prettier --ignore-unknown --check ${filenames}`)
: lintStaged.push(
Expand All @@ -40,6 +41,7 @@ const config = (files) => {
)
if (filesEslint.length) {
const filenames = escapedFileNames(filesEslint)
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
isCI
? lintStaged.push()
: lintStaged.push(
Expand All @@ -53,6 +55,7 @@ const config = (files) => {
micromatch.braces('**/package.json', { expand: true }),
)
if (filesSyncpack.length) {
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
isCI ? lintStaged.push() : lintStaged.push(`pnpm run lint:packages`)
}

Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@
"@semantic-release/commit-analyzer@13.0.0": "patches/@semantic-release__commit-analyzer@13.0.0.patch"
},
"overrides": {
"@typescript-eslint/parser": "7.18.0",
"micromatch": "4.0.5"
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// import data from 'gitmojis'

// eslint-disable-next-line @typescript-eslint/no-var-requires
// @todo(eslint) back to import
// eslint-disable-next-line @typescript-eslint/no-var-requires, @typescript-eslint/no-require-imports
const data = require('gitmojis')

import type { IReleaseRule } from '../types/index.js'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ const getNotionListingByDate = async ({
item['properties'] = sortObject(
dataNormalized({ config, data: i, pageId: item.id, pathVariables }),
)
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
!!item && __items.push(item)
})
const _items = _omit(___items, 'results')
Expand Down
3 changes: 2 additions & 1 deletion packages/notion/src/queries/getQuery/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,9 @@ const getQuery = async ({ config, notionDatabasesQuery, reqQuery }) => {
const filterTagEpisodesByPodcasts: any = []
const podcastIds: any = []
// @todo(NICE-129) eslint
// eslint-disable-next-line no-unsafe-optional-chaining
// eslint-disable-next-line no-unsafe-optional-chaining, @typescript-eslint/no-unused-expressions
!!podcasts && podcastIds.push(...podcasts?.split(','))
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
_size(podcastIds) > 0 &&
_map(podcastIds, (id) =>
filterTagEpisodesByPodcasts.push({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function processCommit(chunk, transform, context) {
try {
chunk = JSON.parse(chunk)
// @todo(NICE-129) eslint
// eslint-disable-next-line no-empty
// eslint-disable-next-line no-empty, @typescript-eslint/no-unused-vars
} catch (e) {}

commit = _cloneDeep(chunk)
Expand Down
1 change: 1 addition & 0 deletions packages/scripts/src/github/label.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ async function createLabels({ owner, repo }) {
colorize`{green.bold ✅️ success: ${owner}/${repo} => createLabel: ${label.name}}`,
)
})
// eslint-disable-next-line @typescript-eslint/no-unused-vars
} catch (error) {
console.log(colorize`{red.bold ❎️ error: ${owner}/${repo} => createLabel`)
// console.log(colorize`{white.italic ${error}}`)
Expand Down
1 change: 1 addition & 0 deletions packages/scripts/src/github/milestone.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ async function createMilestones({ owner, repo }) {
colorize`{green.bold ✅️ success: ${owner}/${repo} => createMilestone: ${milestone.name}}`,
)
})
// eslint-disable-next-line @typescript-eslint/no-unused-vars
} catch (error) {
console.log(colorize`{red.bold ❎️ error: ${owner}/${repo} => createMilestone`)
// console.log(colorize`{white.italic ${error}}`)
Expand Down
Loading

0 comments on commit b6b0fe8

Please sign in to comment.