Skip to content

Commit

Permalink
fix: eslint-config-seek ^14.0.0 (#275)
Browse files Browse the repository at this point in the history
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Adam Skoufis <[email protected]>
  • Loading branch information
renovate[bot] and askoufis authored Oct 7, 2024
1 parent c825792 commit a0ff065
Show file tree
Hide file tree
Showing 11 changed files with 356 additions and 352 deletions.
9 changes: 0 additions & 9 deletions .eslintignore

This file was deleted.

13 changes: 0 additions & 13 deletions .eslintrc.js

This file was deleted.

32 changes: 32 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import eslintConfigSeek from 'eslint-config-seek';

export default [
{
ignores: [
'**/.idea/',
'**/.vscode/',
'**/node_modules*/',
'**/dist/',
'**/dist-*/',
'.changeset/*',
'packages/cli/bin.js',
'**/*.vocab/index.ts',
],
},
...eslintConfigSeek,
{
languageOptions: {
// `jest-puppeteer` provides a global `page` object
globals: {
page: true,
},
},

rules: {
'no-process-exit': 'off',
'no-var-requires': 'off',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/consistent-type-definitions': 'off',
},
},
];
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,16 @@
"@types/node": "^18.11.9",
"@types/wait-on": "^5.3.1",
"cross-env": "^7.0.3",
"eslint": "^8.56.0",
"eslint-config-seek": "^13.0.0",
"eslint": "^9.12.0",
"eslint-config-seek": "^14.0.0",
"expect-puppeteer": "^10.0.0",
"fast-glob": "^3.2.4",
"jest": "^29.4.3",
"jest-puppeteer": "^10.1.0",
"prettier": "^2.1.2",
"puppeteer": "^23.0.0",
"tsx": "^4.10.5",
"typescript": "^5.4.5",
"typescript": "^5.5.4",
"webpack": "^5.37.0"
},
"preconstruct": {
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/compile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ async function writeIfChanged(filepath: string, contents: string) {
const existingContents = await fs.readFile(filepath, { encoding: 'utf-8' });

hasChanged = existingContents !== contents;
} catch (e) {
} catch {
// ignore error, likely a file doesn't exist error so we want to write anyway
}

Expand Down
3 changes: 2 additions & 1 deletion packages/core/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,8 @@ function createConfig(configFilePath: string) {

return {
projectRoot: cwd,
...(require(configFilePath as string) as UserConfig),
// eslint-disable-next-line @typescript-eslint/no-require-imports
...(require(configFilePath) as UserConfig),
};
}

Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ export {
loadAllTranslations,
loadTranslation,
} from './load-translations';
export * from './types';
export type * from './types';
4 changes: 3 additions & 1 deletion packages/core/src/load-translations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ export function loadAltLanguageFile(
const altFilePath = getAltLanguageFilePath(filePath, fallbackLanguage);
delete require.cache[altFilePath];

// eslint-disable-next-line @typescript-eslint/no-require-imports
const translationFile = require(altFilePath);
const { keys: fallbackLanguageTranslation } = getTranslationsFromFile(
translationFile,
Expand All @@ -267,7 +268,7 @@ export function loadAltLanguageFile(
devTranslation,
}),
);
} catch (e) {
} catch {
trace(`Missing alt language file ${getAltLanguageFilePath(
filePath,
fallbackLanguage,
Expand Down Expand Up @@ -310,6 +311,7 @@ export function loadTranslation(
> = {};

delete require.cache[filePath];
// eslint-disable-next-line @typescript-eslint/no-require-imports
const translationContent = require(filePath);
const relativePath = path.relative(
userConfig.projectRoot || process.cwd(),
Expand Down
Loading

0 comments on commit a0ff065

Please sign in to comment.