Skip to content

Commit

Permalink
chore: add eslint ts config
Browse files Browse the repository at this point in the history
  • Loading branch information
dragooncjw committed Feb 21, 2025
1 parent d7bdf8a commit 3c625c0
Show file tree
Hide file tree
Showing 13 changed files with 64 additions and 284 deletions.
78 changes: 7 additions & 71 deletions apps/demo-fixed-layout-simple/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,74 +1,10 @@
module.exports = {
parser: "@typescript-eslint/parser",
parserOptions: {
requireConfigFile: false,
babelOptions: {
babelrc: false,
configFile: false,
cwd: __dirname,
},
},
ignorePatterns: [
'**/*.d.ts',
'**/__mocks__',
'**/node_modules',
'**/build',
'**/dist',
'**/es',
'**/lib',
'**/.codebase',
'**/.changeset',
'**/config',
'**/common/scripts',
'**/output',
'error-log-str.js',
'*.bundle.js',
'*.min.js',
'*.js.map',
'**/output',
'**/*.log',
'**/tsconfig.tsbuildinfo',
'**/vitest.config.ts',
'package.json',
'*.json',
],
const { defineConfig } = require('@flowgram.ai/eslint-config');

module.exports = defineConfig({
preset: 'web',
packageRoot: __dirname,
rules: {
'no-console': 'off',
'react/no-deprecated': 'off',
'import/prefer-default-export': 'off',
'lines-between-class-members': 'warn',
'react/jsx-no-useless-fragment': 'off',
'no-unused-vars': 'off',
'no-redeclare': 'off',
'no-empty-fuNction': 'off',
'prefer-destructurin': 'off',
'no-underscore-dangle': 'off',
'no-empty-function': 'off',
'no-multi-assign': 'off',
'arrow-body-style': 'warn',
'no-useless-constructor': 'off',
'no-param-reassign': 'off',
'max-classes-per-file': 'off',
'grouped-accessor-pairs': 'off',
'no-plusplus': 'off',
'no-restricted-syntax': 'off',
'react/destructuring-assignment': 'off',
'import/extensions': 'off',
'consistent-return': 'off',
'jsx-a11y/no-static-element-interactions': 'off',
'no-use-before-define': 'off',
'no-bitwise': 'off',
'no-case-declarations': 'off',
'react/no-array-index-key': 'off',
'react/require-default-props': 'off',
'no-dupe-class-members': 'off',
'react/jsx-props-no-spreading': 'off',
'no-console': 'off',
'no-shadow': 'off',
'class-methods-use-this': 'off',
'default-param-last': 'off',
'no-unused-vars': 'off',
'import/prefer-default-export': 'off',
'import/extensions': 'off',
'react/prop-types': 'off',
},
}
});
2 changes: 2 additions & 0 deletions apps/demo-fixed-layout-simple/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
"watch": "exit 0"
},
"dependencies": {
"@flowgram.ai/ts-config": "workspace:*",
"@flowgram.ai/eslint-config": "workspace:*",
"@douyinfe/semi-icons": "^2.72.3",
"@douyinfe/semi-ui": "^2.72.3",
"@flowgram.ai/fixed-layout-editor": "workspace:*",
Expand Down
1 change: 1 addition & 0 deletions apps/demo-fixed-layout-simple/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"extends": "@flowgram.ai/ts-config/tsconfig.flow.path.json",
"compilerOptions": {
"rootDir": "./src",
"experimentalDecorators": true,
Expand Down
78 changes: 7 additions & 71 deletions apps/demo-fixed-layout/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,74 +1,10 @@
module.exports = {
parser: "@typescript-eslint/parser",
parserOptions: {
requireConfigFile: false,
babelOptions: {
babelrc: false,
configFile: false,
cwd: __dirname,
},
},
ignorePatterns: [
'**/*.d.ts',
'**/__mocks__',
'**/node_modules',
'**/build',
'**/dist',
'**/es',
'**/lib',
'**/.codebase',
'**/.changeset',
'**/config',
'**/common/scripts',
'**/output',
'error-log-str.js',
'*.bundle.js',
'*.min.js',
'*.js.map',
'**/output',
'**/*.log',
'**/tsconfig.tsbuildinfo',
'**/vitest.config.ts',
'package.json',
'*.json',
],
const { defineConfig } = require('@flowgram.ai/eslint-config');

module.exports = defineConfig({
preset: 'web',
packageRoot: __dirname,
rules: {
'no-console': 'off',
'react/no-deprecated': 'off',
'import/prefer-default-export': 'off',
'lines-between-class-members': 'warn',
'react/jsx-no-useless-fragment': 'off',
'no-unused-vars': 'off',
'no-redeclare': 'off',
'no-empty-fuNction': 'off',
'prefer-destructurin': 'off',
'no-underscore-dangle': 'off',
'no-empty-function': 'off',
'no-multi-assign': 'off',
'arrow-body-style': 'warn',
'no-useless-constructor': 'off',
'no-param-reassign': 'off',
'max-classes-per-file': 'off',
'grouped-accessor-pairs': 'off',
'no-plusplus': 'off',
'no-restricted-syntax': 'off',
'react/destructuring-assignment': 'off',
'import/extensions': 'off',
'consistent-return': 'off',
'jsx-a11y/no-static-element-interactions': 'off',
'no-use-before-define': 'off',
'no-bitwise': 'off',
'no-case-declarations': 'off',
'react/no-array-index-key': 'off',
'react/require-default-props': 'off',
'no-dupe-class-members': 'off',
'react/jsx-props-no-spreading': 'off',
'no-console': 'off',
'no-shadow': 'off',
'class-methods-use-this': 'off',
'default-param-last': 'off',
'no-unused-vars': 'off',
'import/prefer-default-export': 'off',
'import/extensions': 'off',
'react/prop-types': 'off',
},
}
});
2 changes: 2 additions & 0 deletions apps/demo-fixed-layout/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@
"styled-components": "^5"
},
"devDependencies": {
"@flowgram.ai/ts-config": "workspace:*",
"@flowgram.ai/eslint-config": "workspace:*",
"@rspack/cli": "0.2.1",
"@types/lodash-es": "^4.17.12",
"@types/node": "^18",
Expand Down
1 change: 1 addition & 0 deletions apps/demo-fixed-layout/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"extends": "@flowgram.ai/ts-config/tsconfig.flow.path.json",
"compilerOptions": {
"rootDir": "./src",
"outDir": "./dist",
Expand Down
78 changes: 7 additions & 71 deletions apps/demo-free-layout-simple/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,74 +1,10 @@
module.exports = {
parser: "@typescript-eslint/parser",
parserOptions: {
requireConfigFile: false,
babelOptions: {
babelrc: false,
configFile: false,
cwd: __dirname,
},
},
ignorePatterns: [
'**/*.d.ts',
'**/__mocks__',
'**/node_modules',
'**/build',
'**/dist',
'**/es',
'**/lib',
'**/.codebase',
'**/.changeset',
'**/config',
'**/common/scripts',
'**/output',
'error-log-str.js',
'*.bundle.js',
'*.min.js',
'*.js.map',
'**/output',
'**/*.log',
'**/tsconfig.tsbuildinfo',
'**/vitest.config.ts',
'package.json',
'*.json',
],
const { defineConfig } = require('@flowgram.ai/eslint-config');

module.exports = defineConfig({
preset: 'web',
packageRoot: __dirname,
rules: {
'no-console': 'off',
'react/no-deprecated': 'off',
'import/prefer-default-export': 'off',
'lines-between-class-members': 'warn',
'react/jsx-no-useless-fragment': 'off',
'no-unused-vars': 'off',
'no-redeclare': 'off',
'no-empty-fuNction': 'off',
'prefer-destructurin': 'off',
'no-underscore-dangle': 'off',
'no-empty-function': 'off',
'no-multi-assign': 'off',
'arrow-body-style': 'warn',
'no-useless-constructor': 'off',
'no-param-reassign': 'off',
'max-classes-per-file': 'off',
'grouped-accessor-pairs': 'off',
'no-plusplus': 'off',
'no-restricted-syntax': 'off',
'react/destructuring-assignment': 'off',
'import/extensions': 'off',
'consistent-return': 'off',
'jsx-a11y/no-static-element-interactions': 'off',
'no-use-before-define': 'off',
'no-bitwise': 'off',
'no-case-declarations': 'off',
'react/no-array-index-key': 'off',
'react/require-default-props': 'off',
'no-dupe-class-members': 'off',
'react/jsx-props-no-spreading': 'off',
'no-console': 'off',
'no-shadow': 'off',
'class-methods-use-this': 'off',
'default-param-last': 'off',
'no-unused-vars': 'off',
'import/prefer-default-export': 'off',
'import/extensions': 'off',
'react/prop-types': 'off',
},
}
});
2 changes: 2 additions & 0 deletions apps/demo-free-layout-simple/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
"react-dom": "^18"
},
"devDependencies": {
"@flowgram.ai/ts-config": "workspace:*",
"@flowgram.ai/eslint-config": "workspace:*",
"@rspack/cli": "0.2.1",
"@types/lodash-es": "^4.17.12",
"@types/node": "^18",
Expand Down
1 change: 1 addition & 0 deletions apps/demo-free-layout-simple/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"extends": "@flowgram.ai/ts-config/tsconfig.flow.path.json",
"compilerOptions": {
"rootDir": "./src",
"outDir": "./dist",
Expand Down
78 changes: 7 additions & 71 deletions apps/demo-free-layout/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,74 +1,10 @@
module.exports = {
parser: "@typescript-eslint/parser",
parserOptions: {
requireConfigFile: false,
babelOptions: {
babelrc: false,
configFile: false,
cwd: __dirname,
},
},
ignorePatterns: [
'**/*.d.ts',
'**/__mocks__',
'**/node_modules',
'**/build',
'**/dist',
'**/es',
'**/lib',
'**/.codebase',
'**/.changeset',
'**/config',
'**/common/scripts',
'**/output',
'error-log-str.js',
'*.bundle.js',
'*.min.js',
'*.js.map',
'**/output',
'**/*.log',
'**/tsconfig.tsbuildinfo',
'**/vitest.config.ts',
'package.json',
'*.json',
],
const { defineConfig } = require('@flowgram.ai/eslint-config');

module.exports = defineConfig({
preset: 'web',
packageRoot: __dirname,
rules: {
'no-console': 'off',
'react/no-deprecated': 'off',
'import/prefer-default-export': 'off',
'lines-between-class-members': 'warn',
'react/jsx-no-useless-fragment': 'off',
'no-unused-vars': 'off',
'no-redeclare': 'off',
'no-empty-fuNction': 'off',
'prefer-destructurin': 'off',
'no-underscore-dangle': 'off',
'no-empty-function': 'off',
'no-multi-assign': 'off',
'arrow-body-style': 'warn',
'no-useless-constructor': 'off',
'no-param-reassign': 'off',
'max-classes-per-file': 'off',
'grouped-accessor-pairs': 'off',
'no-plusplus': 'off',
'no-restricted-syntax': 'off',
'react/destructuring-assignment': 'off',
'import/extensions': 'off',
'consistent-return': 'off',
'jsx-a11y/no-static-element-interactions': 'off',
'no-use-before-define': 'off',
'no-bitwise': 'off',
'no-case-declarations': 'off',
'react/no-array-index-key': 'off',
'react/require-default-props': 'off',
'no-dupe-class-members': 'off',
'react/jsx-props-no-spreading': 'off',
'no-console': 'off',
'no-shadow': 'off',
'class-methods-use-this': 'off',
'default-param-last': 'off',
'no-unused-vars': 'off',
'import/prefer-default-export': 'off',
'import/extensions': 'off',
'react/prop-types': 'off',
},
}
});
2 changes: 2 additions & 0 deletions apps/demo-free-layout/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@
"styled-components": "^5"
},
"devDependencies": {
"@flowgram.ai/ts-config": "workspace:*",
"@flowgram.ai/eslint-config": "workspace:*",
"@rspack/cli": "0.2.1",
"@types/lodash-es": "^4.17.12",
"@types/node": "^18",
Expand Down
1 change: 1 addition & 0 deletions apps/demo-free-layout/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"extends": "@flowgram.ai/ts-config/tsconfig.flow.path.json",
"compilerOptions": {
"rootDir": "./src",
"outDir": "./dist",
Expand Down
Loading

0 comments on commit 3c625c0

Please sign in to comment.