79 lines
1.7 KiB
JavaScript
79 lines
1.7 KiB
JavaScript
import { config } from "@remotion/eslint-config-flat";
|
|
import importPlugin from "eslint-plugin-import";
|
|
import jsxA11y from "eslint-plugin-jsx-a11y";
|
|
|
|
export default [
|
|
...config,
|
|
{
|
|
files: ["**/*.{ts,tsx}"],
|
|
plugins: {
|
|
import: importPlugin,
|
|
"jsx-a11y": jsxA11y,
|
|
},
|
|
settings: {
|
|
"import/resolver": {
|
|
typescript: true,
|
|
node: true,
|
|
},
|
|
},
|
|
rules: {
|
|
// Enhanced TypeScript rules
|
|
"@typescript-eslint/no-unused-vars": [
|
|
"warn",
|
|
{
|
|
argsIgnorePattern: "^_",
|
|
varsIgnorePattern: "^_",
|
|
},
|
|
],
|
|
"@typescript-eslint/no-explicit-any": "warn",
|
|
"@typescript-eslint/consistent-type-imports": [
|
|
"error",
|
|
{
|
|
prefer: "type-imports",
|
|
},
|
|
],
|
|
|
|
// Import organization for better code structure
|
|
"import/order": [
|
|
"error",
|
|
{
|
|
groups: [
|
|
"builtin",
|
|
"external",
|
|
"internal",
|
|
"parent",
|
|
"sibling",
|
|
"index",
|
|
],
|
|
"newlines-between": "always",
|
|
alphabetize: {
|
|
order: "asc",
|
|
caseInsensitive: true,
|
|
},
|
|
},
|
|
],
|
|
"import/no-duplicates": "error",
|
|
|
|
// Accessibility rules
|
|
"jsx-a11y/alt-text": "warn",
|
|
"jsx-a11y/aria-props": "error",
|
|
"jsx-a11y/aria-role": "error",
|
|
|
|
// Code quality rules
|
|
"no-console": ["warn", { allow: ["warn", "error"] }],
|
|
"prefer-const": "error",
|
|
"no-var": "error",
|
|
eqeqeq: ["error", "always"],
|
|
},
|
|
},
|
|
{
|
|
ignores: [
|
|
"node_modules/**",
|
|
"dist/**",
|
|
"build/**",
|
|
"out/**",
|
|
".remotion/**",
|
|
],
|
|
},
|
|
];
|