UNPKG

@abinnovision/eslint-config-base

Version:

74 lines (71 loc) 2.52 kB
import * as eslint from 'eslint'; declare const config: { files: string[]; languageOptions: { ecmaVersion: "latest"; }; plugins: { /** * eslint-plugin-import is not yet compatible with ESLint v9. * This is a temporary fix to make it compatible in the meantime. * * @see https://github.com/import-js/eslint-plugin-import/issues/2948 */ import: Plugin; "unused-imports": eslint.ESLint.Plugin; }; rules: { /** * Enforce a consistent order and grouping of import statements. * * @see https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/order.md */ "import/order": ["error", { groups: string[][]; "newlines-between": string; alphabetize: { order: string; caseInsensitive: boolean; }; warnOnUnassignedImports: boolean; }]; /** * Enforce the "export" statement is placed at the end of the file. * This avoids sprinkling export statements throughout the file. * * @see https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/exports-last.md */ "import/exports-last": "warn"; /** * Import statements should always be the first statements in a file. * This makes it easier to identify the dependencies of a file. * * NOTE: Directives (e.g. "use strict") are allowed to come before import statements. * * @see https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/first.md */ "import/first": "error"; /** * Enforce a newline after the import statements. * * @see https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/newline-after-import.md */ "import/newline-after-import": "error"; /** * Disable the "no-return-await" rule. */ "no-return-await": "off"; /** * Disable the "no-unused-vars" rule as unused-imports is used instead. */ "no-unused-vars": "off"; "unused-imports/no-unused-imports": "error"; "unused-imports/no-unused-vars": ["warn", { vars: string; varsIgnorePattern: string; args: string; argsIgnorePattern: string; }]; }; }[]; export { config as default };