eslint-config-bananass
Version:
ESLint Config for Bananass Framework.🍌
75 lines (68 loc) • 1.83 kB
JavaScript
/**
* @fileoverview Configuration applied when a user configuration extends from `tsx.react`.
*
* - Values not explicitly defined on the object will use their default values.
* - Use the config inspector (`--inspect-config` in the CLI) to test which config objects apply to a specific file.
*/
// --------------------------------------------------------------------------------
// Import
// --------------------------------------------------------------------------------
import { ts, tsx } from '../files.js';
import { globals, parser, parserOptions } from '../language-options.js';
import { node, react } from '../settings.js';
import {
importPlugin,
nodePlugin,
stylisticJsPlugin,
jsxA11yPlugin,
reactPlugin,
reactHooksPlugin,
typescriptPlugin,
} from '../plugins.js';
import {
eslintRules,
importRules,
nodeRules,
stylisticJsRules,
jsxA11yRules,
reactRules,
reactHooksRules,
typescriptRules,
} from '../rules/index.js';
// --------------------------------------------------------------------------------
// Exports
// --------------------------------------------------------------------------------
/** @type {import("eslint").Linter.Config} */
// @ts-expect-error -- TODO: `typescriptPlugin` makes an error here, but it is a valid config.
export default {
name: 'bananass/tsx-react',
files: [...ts, ...tsx],
languageOptions: {
globals,
parser,
parserOptions,
},
plugins: {
...importPlugin,
...nodePlugin,
...stylisticJsPlugin,
...jsxA11yPlugin,
...reactPlugin,
...reactHooksPlugin,
...typescriptPlugin,
},
rules: {
...eslintRules,
...importRules,
...nodeRules,
...stylisticJsRules,
...jsxA11yRules,
...reactRules,
...reactHooksRules,
...typescriptRules,
},
settings: {
node,
react,
},
};