Skip to content

Commit

Permalink
chore: update packages & updgrade eslint to 9
Browse files Browse the repository at this point in the history
  • Loading branch information
prabhuignoto committed Jun 11, 2024
1 parent b0716e7 commit cd4957f
Show file tree
Hide file tree
Showing 22 changed files with 9,512 additions and 7,550 deletions.
2 changes: 0 additions & 2 deletions .eslintignore

This file was deleted.

42 changes: 0 additions & 42 deletions .eslintrc.cjs

This file was deleted.

52 changes: 52 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
import { fixupConfigRules } from "@eslint/compat";
import pluginJs from "@eslint/js";
import typescriptParser from "@typescript-eslint/parser";
import pluginReactConfig from "eslint-plugin-react/configs/recommended.js";
import globals from "globals";
import tseslint from "typescript-eslint";

export default [
{ languageOptions: { globals: globals.browser } },
pluginJs.configs.recommended,
...tseslint.configs.recommended,
{
files: ["**/*.tsx"],
languageOptions: { parserOptions: { ecmaFeatures: { jsx: true } } },
},
...fixupConfigRules(pluginReactConfig),
{
rules: {
"react-hooks/exhaustive-deps": "off",
"react/jsx-sort-props": "warn",
"react/prop-types": "off",
"react/react-in-jsx-scope": "off",
"@typescript-eslint/no-unused-vars": "off",
},
},
{
languageOptions: {
ecmaVersion: "latest",
sourceType: "module",
parser: typescriptParser,
},
},
{
settings: {
react: {
version: "detect",
},
},
},
{
ignores: [
"**/*.d.ts",
"./src/**/*.test.tsx",
"./src/App.tsx",
"./src/**/*.module.scss",
"**/.*",
"**/dist",
"**/coverage",
"examples",
],
},
];
75 changes: 75 additions & 0 deletions eslint.config.mjs_old
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
import typescriptParser from "@typescript-eslint/parser";

export default [
// js.configs.recommended,
{
// env: {
// browser: true,
// es2021: true,
// },
// extends: [
// "plugin:react/recommended",
// "standard",
// "prettier",
// "plugin:react/jsx-runtime",
// "plugin:jsx-a11y/recommended",
// ],
files: [
"./src/components/**/*.{tsx|ts}",
"./src/effects/**/*.{tsx|ts}",
"./src/common/**/*.{tsx|ts}",
],
languageOptions: {
ecmaVersion: "latest",
sourceType: "module",
// ecmaFeatures: {
// jsx: true,
// },
parser: typescriptParser,
},
// parser: "@typescript-eslint/parser",
// parserOptions: {
// ecmaFeatures: {
// jsx: true,
// },
// ecmaVersion: "latest",
// sourceType: "module",
// },
// plugins: [
// "react",
// "@typescript-eslint",
// "sort-keys-fix",
// "simple-import-sort",
// ],
// plugins: {
// // react: "react",
// "@typescript-eslint": "@typescript-eslint",
// "sort-keys-fix": "sort-keys-fix",
// "simple-import-sort": "simple-import-sort",
// },
// rules: {
// "jsx-a11y/no-noninteractive-tabindex": "off",
// "react-hooks/exhaustive-deps": "off",
// "react/jsx-sort-props": "warn",
// "react/prop-types": "off",
// "simple-import-sort/exports": "error",
// "sort-keys": "warn",
// "sort-keys-fix/sort-keys-fix": "warn",
// "sort-vars": "warn",
// },
settings: {
react: {
version: "detect",
},
},
ignores: [
"**/*.d.ts",
"./src/**/*.test.tsx",
"./src/App.tsx",
"./src/**/*.module.scss",
"**/.*"
// "**/dist",
// "**/coverage",
],
},
];
99 changes: 52 additions & 47 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "react-visual-grid",
"version": "0.9.5",
"license": "MIT",
"type": "module",
"author": {
"name": "Prabhu Murthy",
"email": "[email protected]",
Expand All @@ -26,7 +27,7 @@
"build": "tsc && vite build",
"preview": "vite preview",
"format": "npx prettier --write ./src/components/**/*.{tsx,ts}",
"lint:js": "eslint ./src/components/**/*.tsx",
"lint:js": "eslint --config ./eslint.config.js",
"fix:js": "eslint --fix ./src/components/**/*.tsx",
"lint:css": "stylelint ./src/components/**/*.scss",
"fix:css": "stylelint --fix ./src/components/**/*.scss",
Expand All @@ -39,7 +40,7 @@
},
"dependencies": {
"classnames": "^2.5.1",
"use-debounce": "^10.0.0"
"use-debounce": "^10.0.1"
},
"peerDependencies": {
"react": "^18.1.0",
Expand All @@ -62,85 +63,89 @@
"module": "dist/react-visual-grid.mjs",
"umd": "dist/react-visual-grid.umd.js",
"devDependencies": {
"@babel/core": "^7.23.7",
"@babel/core": "^7.24.7",
"@babel/plugin-proposal-class-properties": "^7.18.6",
"@babel/plugin-proposal-optional-chaining": "^7.21.0",
"@babel/plugin-transform-runtime": "^7.23.7",
"@babel/preset-env": "^7.23.8",
"@babel/preset-react": "^7.23.3",
"@babel/runtime": "^7.23.8",
"@babel/plugin-transform-runtime": "^7.24.7",
"@babel/preset-env": "^7.24.7",
"@babel/preset-react": "^7.24.7",
"@babel/runtime": "^7.24.7",
"@eslint/compat": "^1.0.3",
"@eslint/js": "^9.4.0",
"@rollup/plugin-babel": "^6.0.4",
"@rollup/plugin-buble": "^1.0.3",
"@rollup/plugin-commonjs": "^25.0.7",
"@rollup/plugin-commonjs": "^26.0.1",
"@rollup/plugin-eslint": "^9.0.5",
"@rollup/plugin-node-resolve": "^15.2.3",
"@rollup/plugin-strip": "^3.0.4",
"@rollup/plugin-terser": "^0.4.4",
"@testing-library/jest-dom": "^6.2.0",
"@testing-library/react": "^14.1.2",
"@testing-library/jest-dom": "^6.4.6",
"@testing-library/react": "^16.0.0",
"@testing-library/react-hooks": "^8.0.1",
"@types/jest": "^29.5.11",
"@types/node": "^20.11.5",
"@types/react": "^18.2.48",
"@types/react-dom": "^18.2.18",
"@types/jest": "^29.5.12",
"@types/node": "^20.14.2",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@types/testing-library__jest-dom": "^6.0.0",
"@typescript-eslint/eslint-plugin": "^6.19.0",
"@typescript-eslint/parser": "^6.19.0",
"@vitejs/plugin-react": "^4.2.1",
"@vitest/coverage-v8": "^1.2.1",
"autoprefixer": "^10.4.17",
"@typescript-eslint/eslint-plugin": "^7.13.0",
"@typescript-eslint/parser": "^7.13.0",
"@vitejs/plugin-react": "^4.3.1",
"@vitest/coverage-v8": "^1.6.0",
"autoprefixer": "^10.4.19",
"babel-loader": "^9.1.3",
"clean-webpack-plugin": "^4.0.0",
"copy-webpack-plugin": "^12.0.2",
"css-loader": "^6.9.0",
"cssnano": "^6.0.3",
"eslint": "8.56.0",
"css-loader": "^7.1.2",
"cssnano": "^7.0.2",
"eslint": "9.4.0",
"eslint-config-prettier": "^9.1.0",
"eslint-config-standard": "^17.1.0",
"eslint-plugin-import": "2.29.1",
"eslint-plugin-jsx-a11y": "^6.8.0",
"eslint-plugin-n": "16.6.2",
"eslint-plugin-promise": "6.1.1",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-simple-import-sort": "^10.0.0",
"eslint-plugin-n": "17.8.1",
"eslint-plugin-promise": "6.2.0",
"eslint-plugin-react": "^7.34.2",
"eslint-plugin-simple-import-sort": "^12.1.0",
"eslint-plugin-sort-keys-fix": "^1.1.2",
"fork-ts-checker-webpack-plugin": "^9.0.2",
"husky": "^8.0.3",
"globals": "^15.4.0",
"husky": "^9.0.11",
"jest": "^29.7.0",
"jsdom": "^23.2.0",
"lint-staged": "^15.2.0",
"mini-css-extract-plugin": "^2.7.7",
"jsdom": "^24.1.0",
"lint-staged": "^15.2.5",
"mini-css-extract-plugin": "^2.9.0",
"path": "^0.12.7",
"postcss": "^8.4.33",
"postcss-loader": "^8.0.0",
"postcss": "^8.4.38",
"postcss-loader": "^8.1.1",
"postcss-modules": "^6.0.0",
"postcss-preset-env": "^9.3.0",
"postcss-preset-env": "^9.5.14",
"postcss-scss": "^4.0.9",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router-dom": "^6.21.2",
"rollup": "^4.9.5",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-router-dom": "^6.23.1",
"rollup": "^4.18.0",
"rollup-plugin-analyzer": "^4.0.0",
"rollup-plugin-copy": "^3.5.0",
"rollup-plugin-delete": "^2.0.0",
"rollup-plugin-peer-deps-external": "^2.2.4",
"rollup-plugin-postcss": "^4.0.2",
"rollup-plugin-typescript2": "^0.36.0",
"sass": "^1.69.7",
"sass-loader": "^14.0.0",
"style-loader": "^3.3.4",
"stylelint": "^16.1.0",
"sass": "^1.77.4",
"sass-loader": "^14.2.1",
"style-loader": "^4.0.0",
"stylelint": "^16.6.1",
"stylelint-config-prettier": "^9.0.5",
"stylelint-config-prettier-scss": "^1.0.0",
"stylelint-config-standard": "^36.0.0",
"stylelint-config-standard-scss": "^13.0.0",
"stylelint-config-standard-scss": "^13.1.0",
"terser-webpack-plugin": "^5.3.10",
"ts-loader": "^9.5.1",
"typescript": "^5.3.3",
"vite": "^5.0.11",
"vitest": "^1.2.1",
"webpack": "^5.89.0",
"webpack-bundle-analyzer": "^4.10.1",
"typescript": "^5.4.5",
"typescript-eslint": "^7.13.0",
"vite": "^5.2.13",
"vitest": "^1.6.0",
"webpack": "^5.91.0",
"webpack-bundle-analyzer": "^4.10.2",
"webpack-cli": "^5.1.4",
"webpack-merge-and-include-globally": "^2.3.4"
}
Expand Down
Loading

0 comments on commit cd4957f

Please sign in to comment.