From 5b6b7e87b157213fbe693d0cba2e77f3f05b23e1 Mon Sep 17 00:00:00 2001 From: Paul TGnkin Date: Tue, 24 Dec 2024 14:15:05 +0300 Subject: [PATCH] refactored code and added new flat config for eslint --- package-lock.json | 5 + package.json | 5 + packages/eslint-config-base/flat/index.mjs | 86 ++++++++++ packages/eslint-config-base/index.mjs | 149 ++++++++---------- packages/eslint-config-base/package.json | 7 +- .../src/configs/eslint-all.js | 79 ---------- packages/eslint-config-base/src/index.js | 11 -- packages/eslint-config/flat/index.mjs | 141 +++++++++++++++++ packages/eslint-config/index.mjs | 144 ++++++++--------- packages/eslint-config/package.json | 7 +- .../eslint-config/src/configs/eslint-all.js | 65 -------- packages/eslint-config/src/index.js | 15 -- 12 files changed, 380 insertions(+), 334 deletions(-) create mode 100644 packages/eslint-config-base/flat/index.mjs delete mode 100644 packages/eslint-config-base/src/configs/eslint-all.js delete mode 100644 packages/eslint-config-base/src/index.js create mode 100644 packages/eslint-config/flat/index.mjs delete mode 100644 packages/eslint-config/src/configs/eslint-all.js delete mode 100644 packages/eslint-config/src/index.js diff --git a/package-lock.json b/package-lock.json index 9ad58fa..591db9f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,6 +10,11 @@ "workspaces": [ "packages/*" ], + "dependencies": { + "@salutejs/eslint-config": "2.9.4", + "@salutejs/eslint-config-base": "1.2.0", + "@salutejs/stylelint-config": "0.8.0" + }, "devDependencies": { "@auto-it/conventional-commits": "11.2.1", "@auto-it/npm": "11.2.1", diff --git a/package.json b/package.json index c4b8683..8443c67 100644 --- a/package.json +++ b/package.json @@ -37,5 +37,10 @@ "lerna": "8.1.8", "prettier": "3.3.3", "prettier-plugin-packagejson": "2.5.2" + }, + "dependencies": { + "@salutejs/eslint-config": "2.9.4", + "@salutejs/eslint-config-base": "1.2.0", + "@salutejs/stylelint-config": "0.8.0" } } diff --git a/packages/eslint-config-base/flat/index.mjs b/packages/eslint-config-base/flat/index.mjs new file mode 100644 index 0000000..019ebb1 --- /dev/null +++ b/packages/eslint-config-base/flat/index.mjs @@ -0,0 +1,86 @@ +"use strict" + +import eslintRecommended from '@eslint/js'; +import tsEslintRecommended from '@typescript-eslint/eslint-plugin'; +import tsEslintParser from '@typescript-eslint/parser'; +import importPlugin from 'eslint-plugin-import'; + +/** @type {import("eslint").Linter.Config[]} */ +export default [ + { + files: ['*.ts', '*.tsx'], + languageOptions: { + parser: tsEslintParser, + }, + plugins: { + '@typescript-eslint': tsEslintRecommended, + import: importPlugin, + }, + rules: { + ...eslintRecommended.configs.recommended.rules, + ...tsEslintRecommended.configs['eslint-recommended'].rules, + ...tsEslintRecommended.configs.recommended.rules, + ...importPlugin.configs.recommended.rules, + + '@typescript-eslint/no-empty-function': 'off', + 'no-restricted-syntax': 'off', // В for...of циклах ничего плохого нет + 'spaced-comment': ['error', 'always', { markers: ['/'] }], // разрешаем ts-require directive + 'comma-dangle': ['error', 'always-multiline'], + 'arrow-parens': ['error', 'always'], + + 'space-before-function-paren': [ + 'error', + { + anonymous: 'never', + named: 'never', + asyncArrow: 'always', + }, + ], + indent: 'off', + 'max-len': [ + 'error', + 120, + 2, + { + ignoreUrls: true, + ignoreComments: false, + ignoreRegExpLiterals: true, + ignoreStrings: true, + ignoreTemplateLiterals: true, + }, + ], + 'padding-line-between-statements': [ + 'error', + { blankLine: 'always', prev: '*', next: 'return' }, + { blankLine: 'always', prev: '*', next: 'if' }, + ], + 'implicit-arrow-linebreak': 'off', + 'no-plusplus': 'off', + 'max-classes-per-file': 'off', + 'operator-linebreak': 'off', + 'object-curly-newline': 'off', + 'class-methods-use-this': 'off', + 'no-confusing-arrow': 'off', + 'function-paren-newline': 'off', + 'no-param-reassign': 'off', + 'no-shadow': 'warn', + 'consistent-return': 'off', + + '@typescript-eslint/explicit-function-return-type': 'off', + + 'import/prefer-default-export': 'off', // @grape: https://humanwhocodes.com/blog/2019/01/stop-using-default-exports-javascript-module/ + 'import/order': [ + 'error', + { + groups: [['builtin', 'external'], 'internal', 'parent', 'sibling', 'index'], + 'newlines-between': 'always', + }, + ], + 'import/no-unresolved': 'off', + 'import/extensions': 'off', + 'import/no-extraneous-dependencies': ['off'], + 'arrow-body-style': 'off', + 'no-unused-expressions': 'off', + }, + }, +]; diff --git a/packages/eslint-config-base/index.mjs b/packages/eslint-config-base/index.mjs index fe5f65d..cbf81be 100644 --- a/packages/eslint-config-base/index.mjs +++ b/packages/eslint-config-base/index.mjs @@ -1,86 +1,71 @@ -"use strict" +export default { + extends: [ + 'eslint:recommended', + 'plugin:@typescript-eslint/eslint-recommended', + 'plugin:@typescript-eslint/recommended', + 'plugin:import/recommended', + ], + parser: '@typescript-eslint/parser', + plugins: ['@typescript-eslint'], + rules: { + '@typescript-eslint/no-empty-function': 'off', + 'no-restricted-syntax': 'off', // В for...of циклах ничего плохого нет + 'spaced-comment': ['error', 'always', { markers: ['/'] }], /// разрешаем ts-require directive + 'comma-dangle': ['error', 'always-multiline'], + 'arrow-parens': ['error', 'always'], -import eslintRecommended from 'eslint/conf/eslint-recommended'; -import tsEslintRecommended from '@typescript-eslint/eslint-plugin'; -import tsEslintParser from '@typescript-eslint/parser'; -import importPlugin from 'eslint-plugin-import'; + 'space-before-function-paren': [ + 'error', + { + anonymous: 'never', + named: 'never', + asyncArrow: 'always', + }, + ], + indent: 'off', + 'max-len': [ + 'error', + 120, + 2, + { + ignoreUrls: true, + ignoreComments: false, + ignoreRegExpLiterals: true, + ignoreStrings: true, + ignoreTemplateLiterals: true, + }, + ], + 'padding-line-between-statements': [ + 'error', + { blankLine: 'always', prev: '*', next: 'return' }, + { blankLine: 'always', prev: '*', next: 'if' }, + ], + 'implicit-arrow-linebreak': 'off', + 'no-plusplus': 'off', + 'max-classes-per-file': 'off', + 'operator-linebreak': 'off', + 'object-curly-newline': 'off', + 'class-methods-use-this': 'off', + 'no-confusing-arrow': 'off', + 'function-paren-newline': 'off', + 'no-param-reassign': 'off', + 'no-shadow': 'warn', + 'consistent-return': 'off', -/** @type {import("eslint").Linter.Config[]} */ -export default [ - { - files: ['*.ts', '*.tsx'], - languageOptions: { - parser: tsEslintParser, - }, - plugins: { - '@typescript-eslint': tsEslintRecommended, - import: importPlugin, - }, - rules: { - ...eslintRecommended.rules, - ...tsEslintRecommended.configs['eslint-recommended'].rules, - ...tsEslintRecommended.configs.recommended.rules, - ...importPlugin.configs.recommended.rules, + '@typescript-eslint/explicit-function-return-type': 'off', - '@typescript-eslint/no-empty-function': 'off', - 'no-restricted-syntax': 'off', // В for...of циклах ничего плохого нет - 'spaced-comment': ['error', 'always', { markers: ['/'] }], // разрешаем ts-require directive - 'comma-dangle': ['error', 'always-multiline'], - 'arrow-parens': ['error', 'always'], - - 'space-before-function-paren': [ - 'error', - { - anonymous: 'never', - named: 'never', - asyncArrow: 'always', - }, - ], - indent: 'off', - 'max-len': [ - 'error', - 120, - 2, - { - ignoreUrls: true, - ignoreComments: false, - ignoreRegExpLiterals: true, - ignoreStrings: true, - ignoreTemplateLiterals: true, - }, - ], - 'padding-line-between-statements': [ - 'error', - { blankLine: 'always', prev: '*', next: 'return' }, - { blankLine: 'always', prev: '*', next: 'if' }, - ], - 'implicit-arrow-linebreak': 'off', - 'no-plusplus': 'off', - 'max-classes-per-file': 'off', - 'operator-linebreak': 'off', - 'object-curly-newline': 'off', - 'class-methods-use-this': 'off', - 'no-confusing-arrow': 'off', - 'function-paren-newline': 'off', - 'no-param-reassign': 'off', - 'no-shadow': 'warn', - 'consistent-return': 'off', - - '@typescript-eslint/explicit-function-return-type': 'off', - - 'import/prefer-default-export': 'off', // @grape: https://humanwhocodes.com/blog/2019/01/stop-using-default-exports-javascript-module/ - 'import/order': [ - 'error', - { - groups: [['builtin', 'external'], 'internal', 'parent', 'sibling', 'index'], - 'newlines-between': 'always', - }, - ], - 'import/no-unresolved': 'off', - 'import/extensions': 'off', - 'import/no-extraneous-dependencies': ['off'], - 'arrow-body-style': 'off', - 'no-unused-expressions': 'off', - }, + 'import/prefer-default-export': 'off', // @grape: https://humanwhocodes.com/blog/2019/01/stop-using-default-exports-javascript-module/ + 'import/order': [ + 'error', + { + groups: [['builtin', 'external'], 'internal', 'parent', 'sibling', 'index'], + 'newlines-between': 'always', + }, + ], + 'import/no-unresolved': 'off', + 'import/extensions': 'off', + 'import/no-extraneous-dependencies': ['off'], + 'arrow-body-style': 'off', + 'no-unused-expressions': 'off', }, -]; +}; diff --git a/packages/eslint-config-base/package.json b/packages/eslint-config-base/package.json index aff0b9d..da30434 100644 --- a/packages/eslint-config-base/package.json +++ b/packages/eslint-config-base/package.json @@ -10,8 +10,11 @@ "author": "Salute Frontend Team ", "main": "index.js", "exports": { - ".": "./index.js", - "./flat": "./index.mjs" + ".": { + "require": "./index.js", + "import": "./index.mjs" + }, + "./flat": "./flat/index.mjs" }, "peerDependencies": { "@typescript-eslint/eslint-plugin": ">=8", diff --git a/packages/eslint-config-base/src/configs/eslint-all.js b/packages/eslint-config-base/src/configs/eslint-all.js deleted file mode 100644 index bcd5350..0000000 --- a/packages/eslint-config-base/src/configs/eslint-all.js +++ /dev/null @@ -1,79 +0,0 @@ -"use strict"; - -module.exports = [ - { - files: ["**/*.ts", "**/*.tsx"], - languageOptions: { - parser: require("@typescript-eslint/parser"), - parserOptions: { - ecmaVersion: "latest", - sourceType: "module", - ecmaFeatures: { - jsx: true, - }, - }, - }, - plugins: { - "@typescript-eslint": require("@typescript-eslint/eslint-plugin"), - import: require("eslint-plugin-import"), - }, - rules: { - "no-restricted-syntax": "off", // В for...of циклах ничего плохого нет - "spaced-comment": ["error", "always", { markers: ["/"] }], // Разрешаем ts-require directive - "comma-dangle": ["error", "always-multiline"], - "arrow-parens": ["error", "always"], - "space-before-function-paren": [ - "error", - { - anonymous: "never", - named: "never", - asyncArrow: "always", - }, - ], - "max-len": [ - "error", - 120, - 2, - { - ignoreUrls: true, - ignoreComments: false, - ignoreRegExpLiterals: true, - ignoreStrings: true, - ignoreTemplateLiterals: true, - }, - ], - "padding-line-between-statements": [ - "error", - { blankLine: "always", prev: "*", next: "return" }, - { blankLine: "always", prev: "*", next: "if" }, - ], - "no-plusplus": "off", - "max-classes-per-file": "off", - "operator-linebreak": "off", - "object-curly-newline": "off", - "class-methods-use-this": "off", - "no-confusing-arrow": "off", - "function-paren-newline": "off", - "no-param-reassign": "off", - "no-shadow": "warn", - "consistent-return": "off", - "arrow-body-style": "off", - "no-unused-expressions": "off", - - "@typescript-eslint/no-empty-function": "off", - "@typescript-eslint/explicit-function-return-type": "off", - - "import/prefer-default-export": "off", - "import/order": [ - "error", - { - groups: [["builtin", "external"], "internal", "parent", "sibling", "index"], - "newlines-between": "always", - }, - ], - "import/no-unresolved": "off", - "import/extensions": "off", - "import/no-extraneous-dependencies": ["off"], - }, - }, -]; diff --git a/packages/eslint-config-base/src/index.js b/packages/eslint-config-base/src/index.js deleted file mode 100644 index 7665cb5..0000000 --- a/packages/eslint-config-base/src/index.js +++ /dev/null @@ -1,11 +0,0 @@ -const { version } = require("../package.json") - -//------------------------------------------------------------------------------ -// Public Interface -//------------------------------------------------------------------------------ - -module.exports = [{ - configs: { - all: require("./configs/eslint-all") - } -}] \ No newline at end of file diff --git a/packages/eslint-config/flat/index.mjs b/packages/eslint-config/flat/index.mjs new file mode 100644 index 0000000..424d422 --- /dev/null +++ b/packages/eslint-config/flat/index.mjs @@ -0,0 +1,141 @@ +"use strict"; + +import eslintConfigBase from '@salutejs/eslint-config-base'; +import reactPlugin from 'eslint-plugin-react'; +import reactHooksPlugin from 'eslint-plugin-react-hooks'; +import reactPerfPlugin from 'eslint-plugin-react-perf'; +import jsxA11yPlugin from 'eslint-plugin-jsx-a11y'; +import saluteRulesPlugin from 'eslint-plugin-salute-rules'; +import prettierPlugin from 'eslint-plugin-prettier'; +import prettierConfig from '@salutejs/prettier-config'; + +/** @type {import("eslint").Linter.Config[]} */ +export default [ + eslintConfigBase[0], + + { + plugins: { + react: reactPlugin, + }, + languageOptions: { + parserOptions: { + ecmaFeatures: { + jsx: true, + }, + }, + }, + rules: { + ...reactPlugin.configs.recommended.rules, + 'react/prop-types': 'off', + 'react/static-property-placement': 'off', + 'react/state-in-constructor': 'off', + 'react/jsx-filename-extension': ['error', { extensions: ['.tsx'] }], + 'react/jsx-one-expression-per-line': 'off', + 'react/jsx-indent': ['error', 4], + 'react/jsx-indent-props': ['error', 4], + 'react/display-name': 'error', + 'react/jsx-no-leaked-render': 'off', + 'react/jsx-props-no-spreading': 'off', + 'react/destructuring-assignment': 'off', + 'react/sort-comp': 'off', + 'react/no-array-index-key': 'off', + 'react/require-default-props': 'off', + 'react/function-component-definition': 'off', + 'react/jsx-no-useless-fragment': 'off', + 'react/no-unstable-nested-components': 'error', + }, + settings: { + react: { + version: '18.3.1', + }, + }, + }, + + { + plugins: { + 'react-hooks': reactHooksPlugin, + }, + rules: { + ...reactHooksPlugin.configs.recommended.rules, + }, + }, + + { + plugins: { + 'react-perf': reactPerfPlugin, + }, + rules: { + ...reactPerfPlugin.configs.recommended.rules, + }, + }, + + { + plugins: { + 'jsx-a11y': jsxA11yPlugin, + }, + rules: { + ...jsxA11yPlugin.configs.recommended.rules, + 'jsx-a11y/no-static-element-interactions': 'off', + 'jsx-a11y/click-events-have-key-events': 'off', + 'jsx-a11y/no-noninteractive-tabindex': 'off', + }, + }, + + { + plugins: { + 'salute-rules': saluteRulesPlugin, + }, + rules: { + ...saluteRulesPlugin.configs.all.rules, + }, + }, + + { + plugins: { + prettier: prettierPlugin, + }, + rules: { + 'prettier/prettier': ['error', prettierConfig], + }, + }, + + { + files: ['**/*.ts', '**/*.tsx'], + rules: { + 'no-restricted-imports': [ + 'error', + { + patterns: [ + '@salutejs/plasma-ui/*', + '@salutejs/plasma-tokens/*', + '@salutejs/plasma-icons/*', + '@salutejs/plasma-web/*', + '@salutejs/plasma-b2c/*', + ], + }, + ], + 'default-param-last': 'warn', + '@typescript-eslint/member-ordering': [ + 'warn', + { + default: { + optionalityOrder: 'required-first', + }, + }, + ], + }, + }, + + { + files: ['**/*.tsx'], + languageOptions: { + globals: { + window: true, + document: true, + }, + }, + rules: { + 'react/no-unknown-property': 'error', + }, + }, +]; diff --git a/packages/eslint-config/index.mjs b/packages/eslint-config/index.mjs index 2498fbe..a4477dd 100644 --- a/packages/eslint-config/index.mjs +++ b/packages/eslint-config/index.mjs @@ -1,90 +1,78 @@ -"use strict" +import prettierConfig from "@salutejs/prettier-config" -import eslintConfigBase from '@salutejs/eslint-config-base'; -import reactPlugin from 'eslint-plugin-react'; -import reactHooksPlugin from 'eslint-plugin-react-hooks'; -import reactPerfPlugin from 'eslint-plugin-react-perf'; -import jsxA11yPlugin from 'eslint-plugin-jsx-a11y'; -import saluteRulesPlugin from 'eslint-plugin-salute-rules'; -import prettierPlugin from 'eslint-plugin-prettier'; -import prettierConfig from '@salutejs/prettier-config'; +export default { + extends: [ + '@salutejs/eslint-config-base', + 'plugin:react/recommended', + 'plugin:react-hooks/recommended', + 'plugin:react-perf/recommended', + 'plugin:jsx-a11y/recommended', + 'plugin:salute-rules/all', + 'plugin:prettier/recommended', + ], + rules: { + 'react/prop-types': 'off', + 'react/static-property-placement': 'off', + 'react/state-in-constructor': 'off', + 'react/jsx-filename-extension': ['error', { extensions: ['.tsx'] }], + 'react/jsx-one-expression-per-line': 'off', + 'react/jsx-indent': ['error', 4], + 'react/jsx-indent-props': ['error', 4], + 'react/display-name': 'error', + 'react/jsx-no-leaked-render': 'off', + 'react/jsx-props-no-spreading': 'off', + 'react/destructuring-assignment': 'off', + 'react/sort-comp': 'off', + 'react/no-array-index-key': 'off', + 'react/require-default-props': 'off', + 'react/function-component-definition': 'off', + 'react/jsx-no-useless-fragment': 'off', + 'react/no-unstable-nested-components': 'error', -/** @type {import("eslint").Linter.Config[]} */ -export default [ - eslintConfigBase, - reactPlugin.configs.recommended, - reactHooksPlugin.configs.recommended, - reactPerfPlugin.configs.recommended, - jsxA11yPlugin.configs.recommended, - saluteRulesPlugin.configs.all, - prettierPlugin.configs.recommended, - { - rules: { - 'react/prop-types': 'off', - 'react/static-property-placement': 'off', - 'react/state-in-constructor': 'off', - 'react/jsx-filename-extension': ['error', { extensions: ['.tsx'] }], - 'react/jsx-one-expression-per-line': 'off', - 'react/jsx-indent': ['error', 4], - 'react/jsx-indent-props': ['error', 4], - 'react/display-name': 'error', - 'react/jsx-no-leaked-render': 'off', - 'react/jsx-props-no-spreading': 'off', - 'react/destructuring-assignment': 'off', - 'react/sort-comp': 'off', - 'react/no-array-index-key': 'off', - 'react/require-default-props': 'off', - 'react/function-component-definition': 'off', - 'react/jsx-no-useless-fragment': 'off', - 'react/no-unstable-nested-components': 'error', + 'jsx-a11y/no-static-element-interactions': 'off', + 'jsx-a11y/click-events-have-key-events': 'off', + 'jsx-a11y/no-noninteractive-tabindex': 'off', - 'jsx-a11y/no-static-element-interactions': 'off', - 'jsx-a11y/click-events-have-key-events': 'off', - 'jsx-a11y/no-noninteractive-tabindex': 'off', - - 'no-restricted-imports': [ - 'error', - { - patterns: [ - '@salutejs/plasma-ui/*', - '@salutejs/plasma-tokens/*', - '@salutejs/plasma-icons/*', - '@salutejs/plasma-web/*', - '@salutejs/plasma-b2c/*', - ], - }, - ], + 'no-restricted-imports': [ + 'error', + { + patterns: [ + '@salutejs/plasma-ui/*', + '@salutejs/plasma-tokens/*', + '@salutejs/plasma-icons/*', + '@salutejs/plasma-web/*', + '@salutejs/plasma-b2c/*', + ], + }, + ], - 'default-param-last': 'warn', + 'default-param-last': 'warn', - '@typescript-eslint/member-ordering': [ - 'warn', - { - default: { - optionalityOrder: 'required-first', - }, - }, - ], - 'prettier/prettier': ['error', prettierConfig], - }, - overrides: [ + '@typescript-eslint/member-ordering': [ + 'warn', { - files: ['*.tsx?'], - languageOptions: { - globals: { - window: true, - document: true, - }, - }, - rules: { - 'react/no-unknown-property': 'error', + default: { + optionalityOrder: 'required-first', }, }, ], - settings: { - react: { - version: '18.3.1', + 'prettier/prettier': ['error', prettierConfig], + }, + overrides: [ + { + files: ['*.tsx?'], + env: { + browser: true, }, + globals: { + window: true, + document: true, + }, + }, + ], + settings: { + react: { + version: '18.3.1', }, }, -]; +}; diff --git a/packages/eslint-config/package.json b/packages/eslint-config/package.json index fa97cdb..a6aa582 100644 --- a/packages/eslint-config/package.json +++ b/packages/eslint-config/package.json @@ -10,8 +10,11 @@ "author": "Salute Frontend Team ", "main": "index.js", "exports": { - ".": "./index.js", - "./flat": "./index.mjs" + ".": { + "require": "./index.js", + "import": "./index.mjs" + }, + "./flat": "./flat/index.mjs" }, "scripts": { "test": "jest" diff --git a/packages/eslint-config/src/configs/eslint-all.js b/packages/eslint-config/src/configs/eslint-all.js deleted file mode 100644 index 315d7c2..0000000 --- a/packages/eslint-config/src/configs/eslint-all.js +++ /dev/null @@ -1,65 +0,0 @@ -"use strict"; - -const prettierConfig = require('@salutejs/prettier-config'); -const baseConfig = require('../../../eslint-config-base/src/index') - -module.exports = [ - { - extends: [baseConfig], - plugins: { - react: require('eslint-plugin-react'), - reactHooks: require('eslint-plugin-react-hooks'), - reactPerf: require('eslint-plugin-react-perf'), - jsxA11y: require('eslint-plugin-jsx-a11y'), - saluteRules: require('eslint-plugin-salute-rules'), - prettier: require('eslint-plugin-prettier'), - }, - rules: { - 'react/prop-types': 'off', - 'react/static-property-placement': 'off', - 'react/state-in-constructor': 'off', - 'react/jsx-filename-extension': ['error', { extensions: ['.tsx'] }], - 'react/jsx-one-expression-per-line': 'off', - 'react/jsx-indent': ['error', 4], - 'react/jsx-indent-props': ['error', 4], - 'react/display-name': 'error', - 'react/jsx-no-leaked-render': 'off', - 'react/jsx-props-no-spreading': 'off', - 'react/destructuring-assignment': 'off', - 'react/sort-comp': 'off', - 'react/no-array-index-key': 'off', - 'react/require-default-props': 'off', - 'react/function-component-definition': 'off', - 'react/jsx-no-useless-fragment': 'off', - 'react/no-unstable-nested-components': 'error', - - 'jsx-a11y/no-static-element-interactions': 'off', - 'jsx-a11y/click-events-have-key-events': 'off', - 'jsx-a11y/no-noninteractive-tabindex': 'off', - - 'no-restricted-imports': [ - 'error', - { - patterns: [ - '@salutejs/plasma-ui/*', - '@salutejs/plasma-tokens/*', - '@salutejs/plasma-icons/*', - '@salutejs/plasma-web/*', - '@salutejs/plasma-b2c/*', - ], - }, - ], - 'default-param-last': 'warn', - - '@typescript-eslint/member-ordering': [ - 'warn', - { - default: { - optionalityOrder: 'required-first', - }, - }, - ], - 'prettier/prettier': ['error', prettierConfig], - }, - }, -]; diff --git a/packages/eslint-config/src/index.js b/packages/eslint-config/src/index.js deleted file mode 100644 index 2e06fd5..0000000 --- a/packages/eslint-config/src/index.js +++ /dev/null @@ -1,15 +0,0 @@ -const { version } = require("../package.json") - -//------------------------------------------------------------------------------ -// Public Interface -//------------------------------------------------------------------------------ - -module.exports = { - meta: { - name: "@salutejs/eslint-config", - version - }, - configs: { - all: require("./configs/eslint-all") - } -} \ No newline at end of file