Registry / testing / eslint-config-brightspace

eslint-config-brightspace

JSON →
library2.12.1jsnpmunverified

Shareable ESLint configuration for Brightspace projects. Version 2.12.1 is the latest stable release, updated as of February 2026, with a monthly release cadence driven by dependency bumps and fixes. It supports ESLint 7–9 and provides environment-specific configs (node, browser, Lit, React, testing). Unlike generic ESLint configs, it includes helper functions like `addExtensions` and `setDirectoryConfigs` for fine-grained control over file extensions and directory-level overrides. Notably, it migrated from deprecated `quotes` rule to `@stylistic/quotes` in v2.11.1, and adopted the flat config format (eslint.config.js) required by ESLint 9. This config is designed exclusively for D2L/Brightspace ecosystem but can serve as a reference for large-scale project configurations.

npm install eslint-config-brightspace
INSTALL
IMPORT
SIG · ESLINT-CONFIG-BRIG
E
eslint-config-brightspace
testingjavascriptv2.12.1
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

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

nodeConfig
import { nodeConfig } from 'eslint-config-brightspace'
const nodeConfig = require('eslint-config-brightspace')
This package is ESM-only; CommonJS require will fail. Use import syntax in eslint.config.js.
browserConfig
import { browserConfig } from 'eslint-config-brightspace'
import browserConfig from 'eslint-config-brightspace'
Default export is not available; always use named imports.
addExtensions
import { addExtensions, nodeConfig } from 'eslint-config-brightspace'
The addExtensions helper is also a named export; commonly used together with a config.
setDirectoryConfigs
import { setDirectoryConfigs, litConfig, nodeConfig, testingConfig } from 'eslint-config-brightspace'
setDirectoryConfigs replaces the cascading hierarchy from ESLint 8; ensure proper ordering.

Shows how to combine browser and node configs with custom file extensions and an extra rule override.

// eslint.config.js import { nodeConfig, browserConfig, addExtensions } from 'eslint-config-brightspace'; export default [ ...browserConfig, ...addExtensions(nodeConfig, ['.js', '.mjs']), { rules: { 'no-console': 'warn', }, }, ];
Debug
Known issues
gotchaESM-only package: This package uses ES modules. It cannot be imported with CommonJS require().
fix
Use import syntax in an ESM context (type: 'module' in package.json or .mjs extension).
affects: >=2.0.0
deprecatedDeprecated quotes rule: The 'quotes' rule has been replaced by '@stylistic/quotes' in v2.11.1.
fix
Upgrade to v2.11.1 or later to use the stylistic version.
affects: <2.11.1
gotchaFlat config only: This package uses the new flat config format (eslint.config.js) and does not support .eslintrc.* formats.
fix
Use eslint.config.js file; remove any .eslintrc.* files.
affects: >=2.0.0
breakingESLint compatibility limited to 7-9: v2.12.1 explicitly restricts peer dependency to ESLint 7, 8, and 9.
fix
Ensure ESLint version is 7.x, 8.x, or 9.x. ESLint 10+ not supported without upgrade.
affects: >=2.12.1
gotchasetDirectoryConfigs forces prior configs to ignore specified directories: Configs applied via setDirectoryConfigs will be ignored by any previously defined configs for paths matching the directory.
fix
Order configurations correctly: define global config first, then directory-specific overrides.
affects: >=2.0.0
gotchaNo default export: The package does not export a default configuration; always use named exports.
fix
Use named imports like `import { nodeConfig } from 'eslint-config-brightspace'`.
affects: >=2.0.0
Errors
Common errors & fixes
Error [ERR_REQUIRE_ESM]: require() of ES Module /path/to/eslint-config-brightspace/index.js from /path/to/eslint.config.js not supported.
Trying to require an ESM-only package with CommonJS require() or using require() in eslint.config.js without ESM context.
fix
Change to import syntax and ensure eslint.config.js is treated as ESM (e.g., set type: 'module' in package.json).
Configuration for rule "quotes" is invalid: "@stylistic/quotes" has not been loaded.
Using an older version (<2.11.1) that still uses the deprecated 'quotes' rule, or the plugin '@stylistic/eslint-plugin' is missing.
fix
Upgrade to v2.11.1+ and install '@stylistic/eslint-plugin' if it's not automatically installed.
ESLint couldn't find the config "eslint-config-brightspace" to extend from. Please check that the name of the config is correct.
Using .eslintrc.* format instead of eslint.config.js flat config.
fix
Convert to eslint.config.js and use import syntax. Remove .eslintrc.* files.
Cannot read properties of undefined (reading 'map')
Occurs when setDirectoryConfigs is called with incorrect arguments (e.g., missing config array).
fix
Ensure the first argument is a valid config array (e.g., nodeConfig) and the second argument is an object mapping directory names to config arrays.
Upgrade
Version history
2.12.1latest on npm
Audit
Dependencies
eslintrequiredpeer dependency; the config requires ESLint 7–9
globalsrequiredused to define global variables for different environments (browser, node, etc.)
eslint-plugin-importrequiredenforces import/export rules
Agent activity
2 hits · last 30 days
node
2
Resources