Skip to content

Commit

Permalink
fix: update npm packages to latest versions
Browse files Browse the repository at this point in the history
  • Loading branch information
cindyli committed Aug 28, 2024
1 parent 05fb519 commit 2c70306
Show file tree
Hide file tree
Showing 7 changed files with 1,286 additions and 1,728 deletions.
41 changes: 0 additions & 41 deletions .eslintrc.json

This file was deleted.

41 changes: 41 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import typescriptEslint from "@typescript-eslint/eslint-plugin";
import globals from "globals";
import tsParser from "@typescript-eslint/parser";
import path from "node:path";
import { fileURLToPath } from "node:url";
import js from "@eslint/js";
import { FlatCompat } from "@eslint/eslintrc";

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
});

export default [{
ignores: ["**/dist/", "**/node_modules/"],
}, ...compat.extends("eslint:recommended", "plugin:@typescript-eslint/recommended"), {
plugins: {
"@typescript-eslint": typescriptEslint,
},

languageOptions: {
globals: {
...globals.browser,
...globals.node,
},

parser: tsParser,
ecmaVersion: "latest",
sourceType: "module",
},

rules: {
indent: ["error", 2],
"linebreak-style": ["error", "unix"],
quotes: ["error", "double"],
semi: ["error", "always"],
},
}];
2 changes: 1 addition & 1 deletion jest.config.client.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ module.exports = {
transformIgnorePatterns: ["<rootDir>/dist/"],
moduleFileExtensions: ["mjs", "js", "jsx", "ts", "tsx", "json", "node"],
moduleNameMapper: {
"^.+\\.(css|less|scss)$": "babel-jest"
"^.+\\.(css|less|scss)$": "babel-jest"
},
};
2 changes: 1 addition & 1 deletion jest.config.node.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ module.exports = {
transformIgnorePatterns: ["<rootDir>/dist/"],
moduleFileExtensions: ["mjs", "js", "jsx", "ts", "tsx", "json", "node"],
moduleNameMapper: {
"^.+\\.(css|less|scss)$": "babel-jest"
"^.+\\.(css|less|scss)$": "babel-jest"
}
};
Loading

0 comments on commit 2c70306

Please sign in to comment.