- Add this module as a
devDependency
to your project (`npm install eslint-config-oharagroup --save-dev) - Create eslint.config.js (for ESM projects) or eslint.config.mjs (for CJS projects) as follows:
import oharagroup from "eslint-config-oharagroup";
export default [
...oharagroup.js,
// add any additional config here
];
import oharagroup from "eslint-config-oharagroup";
import tseslint from "typescript-eslint";
export default tseslint.config(
...oharagroup.ts,
// add any additional config here
);
import oharagroup from "eslint-config-oharagroup";
import tseslint from "typescript-eslint";
export default tseslint.config(
...oharagroup.svelte,
// add any additional config here
);
- Apply any rule changes to the corresponding rule files
- Run linting on this package (
npm run lint
) - Update the
eslint
version inpackage.json
, and bump the packageversion
- Ensure that this package is registered for linking (
cd [this dir] && npm link
) - Test by going to a project that uses the shared config and
npm link eslint-config-oharagroup
- Publish the new version (
npm run publish
) - Unlink the local version in the test project if necessary (
npm unlink
)
The package defines three configs to choose from, depending on the type of project:
- JS-only projects (
oharagroup.js
) - JS + TS projects (
oharagroup.ts
) - Svelte + TS projects (
oharagroup.svelte
)
Config | Files matched | Rules applied to all matching files |
---|---|---|
oharagroup.js |
*.js *.mjs *.cjs |
eslint |
oharagroup.ts |
*.js *.mjs *.cjs *.ts *.mts *.cts |
eslint typescript-eslint |
oharagroup.svelte |
*.js *.mjs *.cjs *.ts *.mts *.cts *.svelte |
eslint (includes <script> blocks in Svelte)typescript-eslint (includes <script lang="ts"> blocks in Svelte)svelte |