eslint-config-brightspace
raw JSON →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.
Common errors
error Error [ERR_REQUIRE_ESM]: require() of ES Module /path/to/eslint-config-brightspace/index.js from /path/to/eslint.config.js not supported. ↓
error Configuration for rule "quotes" is invalid: "@stylistic/quotes" has not been loaded. ↓
error ESLint couldn't find the config "eslint-config-brightspace" to extend from. Please check that the name of the config is correct. ↓
error Cannot read properties of undefined (reading 'map') ↓
Warnings
gotcha ESM-only package: This package uses ES modules. It cannot be imported with CommonJS require(). ↓
deprecated Deprecated quotes rule: The 'quotes' rule has been replaced by '@stylistic/quotes' in v2.11.1. ↓
gotcha Flat config only: This package uses the new flat config format (eslint.config.js) and does not support .eslintrc.* formats. ↓
breaking ESLint compatibility limited to 7-9: v2.12.1 explicitly restricts peer dependency to ESLint 7, 8, and 9. ↓
gotcha setDirectoryConfigs forces prior configs to ignore specified directories: Configs applied via setDirectoryConfigs will be ignored by any previously defined configs for paths matching the directory. ↓
gotcha No default export: The package does not export a default configuration; always use named exports. ↓
Install
npm install eslint-config-brightspace yarn add eslint-config-brightspace pnpm add eslint-config-brightspace Imports
- nodeConfig wrong
const nodeConfig = require('eslint-config-brightspace')correctimport { nodeConfig } from 'eslint-config-brightspace' - browserConfig wrong
import browserConfig from 'eslint-config-brightspace'correctimport { browserConfig } from 'eslint-config-brightspace' - addExtensions
import { addExtensions, nodeConfig } from 'eslint-config-brightspace' - setDirectoryConfigs
import { setDirectoryConfigs, litConfig, nodeConfig, testingConfig } from 'eslint-config-brightspace'
Quickstart
// eslint.config.js
import { nodeConfig, browserConfig, addExtensions } from 'eslint-config-brightspace';
export default [
...browserConfig,
...addExtensions(nodeConfig, ['.js', '.mjs']),
{
rules: {
'no-console': 'warn',
},
},
];