mirror of
https://github.com/stan-smith/FossFLOW.git
synced 2026-04-24 00:53:44 -04:00
feat: upgraded to ESlint 9, fixed some vulns
This commit is contained in:
38
.eslintrc
38
.eslintrc
@@ -1,38 +0,0 @@
|
||||
{
|
||||
"env": {
|
||||
"browser": true,
|
||||
"es2021": true
|
||||
},
|
||||
"plugins": [
|
||||
"react",
|
||||
"react-hooks",
|
||||
"prettier"
|
||||
],
|
||||
"extends": [
|
||||
"airbnb",
|
||||
"airbnb-typescript",
|
||||
"plugin:react-hooks/recommended",
|
||||
"prettier"
|
||||
],
|
||||
"parserOptions": {
|
||||
"ecmaVersion": "latest",
|
||||
"sourceType": "module",
|
||||
"project": "./tsconfig.json",
|
||||
},
|
||||
"rules": {
|
||||
"prettier/prettier": 2,
|
||||
"import/prefer-default-export": [0],
|
||||
"react/function-component-definition": [0],
|
||||
"react/jsx-props-no-spreading": [0],
|
||||
"consistent-return": [0],
|
||||
"react/no-unused-prop-types": ["warn"],
|
||||
"react/require-default-props": [0],
|
||||
"react/prop-types": [0],
|
||||
"no-param-reassign": ["error", { "props": true, "ignorePropertyModificationsFor": ["draft"] }],
|
||||
"arrow-body-style": ["error", "always"]
|
||||
},
|
||||
"ignorePatterns": [
|
||||
"/dist",
|
||||
"/node_modules"
|
||||
]
|
||||
}
|
||||
110
eslint.config.mjs
Normal file
110
eslint.config.mjs
Normal file
@@ -0,0 +1,110 @@
|
||||
import js from '@eslint/js';
|
||||
import tseslint from 'typescript-eslint';
|
||||
import reactPlugin from 'eslint-plugin-react';
|
||||
import reactHooksPlugin from 'eslint-plugin-react-hooks';
|
||||
import jsxA11yPlugin from 'eslint-plugin-jsx-a11y';
|
||||
import prettierConfig from 'eslint-config-prettier';
|
||||
import prettierPlugin from 'eslint-plugin-prettier';
|
||||
|
||||
export default tseslint.config(
|
||||
// Base recommended configs
|
||||
js.configs.recommended,
|
||||
...tseslint.configs.recommended,
|
||||
|
||||
// Global ignores
|
||||
{
|
||||
ignores: [
|
||||
'**/dist/**',
|
||||
'**/node_modules/**',
|
||||
'**/build/**',
|
||||
'**/.git/**',
|
||||
],
|
||||
},
|
||||
|
||||
// Main configuration
|
||||
{
|
||||
files: ['**/*.{js,mjs,cjs,jsx,ts,tsx}'],
|
||||
|
||||
plugins: {
|
||||
react: reactPlugin,
|
||||
'react-hooks': reactHooksPlugin,
|
||||
'jsx-a11y': jsxA11yPlugin,
|
||||
prettier: prettierPlugin,
|
||||
},
|
||||
|
||||
languageOptions: {
|
||||
ecmaVersion: 'latest',
|
||||
sourceType: 'module',
|
||||
parserOptions: {
|
||||
ecmaFeatures: {
|
||||
jsx: true,
|
||||
},
|
||||
},
|
||||
globals: {
|
||||
// Browser globals
|
||||
window: 'readonly',
|
||||
document: 'readonly',
|
||||
navigator: 'readonly',
|
||||
console: 'readonly',
|
||||
setTimeout: 'readonly',
|
||||
setInterval: 'readonly',
|
||||
clearTimeout: 'readonly',
|
||||
clearInterval: 'readonly',
|
||||
fetch: 'readonly',
|
||||
// Node globals
|
||||
process: 'readonly',
|
||||
__dirname: 'readonly',
|
||||
__filename: 'readonly',
|
||||
module: 'readonly',
|
||||
require: 'readonly',
|
||||
// Test globals
|
||||
describe: 'readonly',
|
||||
it: 'readonly',
|
||||
test: 'readonly',
|
||||
expect: 'readonly',
|
||||
beforeEach: 'readonly',
|
||||
afterEach: 'readonly',
|
||||
jest: 'readonly',
|
||||
},
|
||||
},
|
||||
|
||||
settings: {
|
||||
react: {
|
||||
version: 'detect',
|
||||
},
|
||||
},
|
||||
|
||||
rules: {
|
||||
// Prettier
|
||||
'prettier/prettier': 'error',
|
||||
|
||||
// Import rules
|
||||
'import/prefer-default-export': 'off',
|
||||
|
||||
// React rules
|
||||
'react/function-component-definition': 'off',
|
||||
'react/jsx-props-no-spreading': 'off',
|
||||
'react/no-unused-prop-types': 'warn',
|
||||
'react/require-default-props': 'off',
|
||||
'react/prop-types': 'off',
|
||||
|
||||
// React Hooks rules
|
||||
'react-hooks/rules-of-hooks': 'error',
|
||||
'react-hooks/exhaustive-deps': 'warn',
|
||||
|
||||
// General rules
|
||||
'consistent-return': 'off',
|
||||
'no-param-reassign': ['error', {
|
||||
props: true,
|
||||
ignorePropertyModificationsFor: ['draft']
|
||||
}],
|
||||
'arrow-body-style': ['error', 'always'],
|
||||
|
||||
// TypeScript rules
|
||||
'@typescript-eslint/no-explicit-any': 'warn',
|
||||
},
|
||||
},
|
||||
|
||||
// Prettier config (must be last to override other configs)
|
||||
prettierConfig,
|
||||
);
|
||||
1686
package-lock.json
generated
1686
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "fossflow-monorepo",
|
||||
"version": "1.1.1",
|
||||
"version": "1.2.0",
|
||||
"private": true,
|
||||
"description": "Monorepo for FossFLOW diagram editor and library",
|
||||
"workspaces": [
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "fossflow-app",
|
||||
"version": "1.1.1",
|
||||
"version": "1.2.0",
|
||||
"private": true,
|
||||
"description": "Progressive Web App for creating isometric diagrams",
|
||||
"dependencies": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "fossflow-backend",
|
||||
"version": "1.1.1",
|
||||
"version": "1.2.0",
|
||||
"description": "Optional backend server for FossFLOW persistent storage",
|
||||
"main": "server.js",
|
||||
"type": "module",
|
||||
|
||||
1432
packages/fossflow-lib/dist/index.js
vendored
1432
packages/fossflow-lib/dist/index.js
vendored
File diff suppressed because one or more lines are too long
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "fossflow",
|
||||
"version": "1.1.1",
|
||||
"version": "1.2.0",
|
||||
"private": false,
|
||||
"description": "An open-source React component for drawing network diagrams - forked from isoflow.",
|
||||
"license": "MIT",
|
||||
@@ -68,18 +68,18 @@
|
||||
"@types/pathfinding": "^0.0.6",
|
||||
"@types/quill": "^2.0.14",
|
||||
"@types/uuid": "^9.0.8",
|
||||
"@typescript-eslint/eslint-plugin": "^6.21.0",
|
||||
"@typescript-eslint/parser": "^6.21.0",
|
||||
"@eslint/js": "^9.37.0",
|
||||
"@typescript-eslint/eslint-plugin": "^8.46.0",
|
||||
"@typescript-eslint/parser": "^8.46.0",
|
||||
"babel-loader": "^10.0.0",
|
||||
"css-loader": "^6.11.0",
|
||||
"eslint": "^8.57.1",
|
||||
"eslint-config-airbnb": "^19.0.4",
|
||||
"eslint-config-airbnb-typescript": "^17.1.0",
|
||||
"eslint-config-prettier": "^8.10.2",
|
||||
"eslint": "^9.37.0",
|
||||
"eslint-config-prettier": "^10.1.8",
|
||||
"eslint-plugin-jsx-a11y": "^6.10.2",
|
||||
"eslint-plugin-prettier": "^5.5.4",
|
||||
"eslint-plugin-react": "^7.37.5",
|
||||
"eslint-plugin-react-hooks": "^4.6.2",
|
||||
"eslint-plugin-react-hooks": "^7.0.0",
|
||||
"typescript-eslint": "^8.46.0",
|
||||
"jest": "^29.7.0",
|
||||
"jest-environment-jsdom": "^29.7.0",
|
||||
"jsdom": "^21.1.2",
|
||||
|
||||
Reference in New Issue
Block a user