Registry / testing / eslint-config-htmlacademy

eslint-config-htmlacademy

JSON →
library11.0.0jsnpmunverified

ESLint shareable config enforcing the HTML Academy Codeguide. Version 11.0.0, actively maintained with annual breaking releases. Targets ESLint >=10 and Node >=24. Provides six presets (vanilla, typescript, node, node-typescript, react, react-typescript) each with strict stylistic rules, defensive best practices, and modern syntax enforcement. TypeScript presets include ~150 type-aware rules from typescript-eslint. React presets bundle @eslint-react and jsx-a11y rules. Unique features: mandatory kebab-case for JS/TS, PascalCase for JSX/TSX, Node protocol imports enforcement, and monorepo-friendly tsconfig discovery.

npm install eslint-config-htmlacademy
INSTALL
IMPORT
SIG · ESLINT-CONFIG-HTML
E
eslint-config-htmlacademy
testingjavascriptv11.0.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

preset
✓ import preset from 'eslint-config-htmlacademy/vanilla'
✗ const preset = require('eslint-config-htmlacademy/vanilla')
ESM-only; require() fails. Use default import from preset subpath.
preset (TypeScript)
✓ import preset from 'eslint-config-htmlacademy/typescript'
✗ import preset from 'eslint-config-htmlacademy/typescript' // correct
TypeScript presets require tsconfig.json in project root.
preset (React)
✓ import preset from 'eslint-config-htmlacademy/react-typescript'
✗ import preset from 'eslint-config-htmlacademy/react'
Use react-typescript for TypeScript projects; react preset omits type-aware rules.

Create eslint.config.js with the vanilla preset and disable no-console for JS files.

// eslint.config.js import preset from 'eslint-config-htmlacademy/vanilla'; export default [ { ignores: ['dist/', 'node_modules/'], }, ...preset, { files: ['**/*.js'], rules: { 'no-console': 'off', }, }, ];
Debug
Known issues
breakingRequires ESLint >=10 and Node >=24. Older ESLint and Node versions are incompatible.
fix
Update Node to >=24 and ESLint to >=10.
affects: >=11.0.0
breakingESM-only package; require() will throw an error.
fix
Use import syntax or dynamic import().
affects: >=10.0.0
deprecatedThe 'react' preset without TypeScript is deprecated; prefer 'react-typescript' for new projects.
fix
Switch to react-typescript and add tsconfig.json.
affects: >=11.0.0
gotchaTypeScript presets require a tsconfig.json in the project root. Monorepos need tsconfig paths configured manually.
fix
Create tsconfig.json or set parserOptions.project in your config.
affects: >=10.0.0
gotchaFile naming rule 'check-file' enforces KEBAB_CASE for .js/.ts and PASCAL_CASE for .jsx/.tsx. Noncompliant files fail lint.
fix
Rename files to match pattern: my-component.js or MyComponent.jsx.
affects: >=11.0.0
breakingNode presets require explicit imports of Node built-ins (e.g., import process from 'node:process'). Global process is no longer allowed.
fix
Add import process from 'node:process' to files using process.
affects: >=11.0.0
deprecatedESLint flat config (eslint.config.js) is required; .eslintrc files are not supported.
fix
Migrate to eslint.config.js using the provided preset.
affects: >=11.0.0
Errors
Common errors & fixes
Error: Failed to load config 'eslint-config-htmlacademy/vanilla' to extend from.
Missing ESLint config file or incorrect import statement.
fix
Create eslint.config.js with 'import preset from 'eslint-config-htmlacademy/vanilla'; export default [...preset];'
TypeError: Cannot read properties of undefined (reading 'some')
TypeScript preset used without a valid tsconfig.json.
fix
Add tsconfig.json to project root or set parserOptions.project in config.
Error: File '/path/to/file.js' is not in kebab-case.
File naming rule check-file rejects non-KEBAB_CASE in .js files.
fix
Rename file to kebab-case, e.g., my-util.js.
Error: 'process' is not defined. (no-undef)
Node preset forbids globals; process must be imported.
fix
Add 'import process from 'node:process';' at top of file.
Error: 'require' is not defined. (no-undef)
ESLint flat config does not allow require() in config files; use import.
fix
Replace require() with import: 'import preset from 'eslint-config-htmlacademy/vanilla';'
Upgrade
Version history
11.0.0latest on npm
Audit
Dependencies
eslintrequiredpeer dependency required at runtime
typescriptoptionalpeer dependency required for TypeScript presets
Agent activity
9 hits · last 30 days
node
8
Resources
eslint-config-htmlacademy — npm install eslint-config-htmlacademy · libregistry