eslint-config-ballistix
v1.3.0
Published
Readme
shared-eslint-config
This command installs a set of ESLint packages and plugins as development dependencies for a TypeScript project
yarn add -D @eslint/compat \
@eslint/js \
eslint \
@typescript-eslint/eslint-plugin \
@typescript-eslint/parser \
eslint-config-prettier \
eslint-plugin-import \
eslint-plugin-simple-import-sort \
typescript-eslint \
eslint-config-ballistix \
eslint-plugin-react-hooks@canary \
eslint-plugin-prettierIf you have a Next.js project, we need to adjust the lint command in your package.json, the build will currently fail since next lint uses an outdated version of eslint.
"lint": "eslint .",@eslint/compat: Provides compatibility for older ESLint - configurations.@eslint/js: Core ESLint functionality for JavaScript.typescript-eslint: Contains TypeScript ESLint configurations.@typescript-eslint/eslint-plugin: Linting rules specific to TypeScript.@typescript-eslint/parser: Parses TypeScript code for ESLint.eslint-config-prettier: Disables ESLint rules that might conflict with Prettier.eslint-plugin-import: Supports linting of ES6+ import/export syntax.eslint-plugin-simple-import-sort: Helps in sorting import statements.eslint-plugin-react-hooks: Provides linting rules for React Hooks.eslint-plugin-prettier: Provides linting rules for Prettier.
To use it in a project, remove the old eslint and prettier config files and add the following files:
// eslint.config.mjs
import { eslintConfig } from "eslint-config-ballistix";
export default [
...eslintConfig,
{
// any project specific overwrites you want to make
}
];// prettier.config.mjs
import { prettierConfig } from 'eslint-config-ballistix';
export default {
...prettierConfig,
};
