Configuration
Jess reads config from a styles.config.{ts,js} file at your project root. Keep it small at first; grow it only when your build needs it.
// styles.config.js
export default {
options: {}
}
options
dynamic
Changes compilation mode so dynamic content is represented as CSS custom properties and patch-friendly output. Reach for this when you need runtime theme switching or app-level style updates.
module
Overrides whether Jess files compile as modules globally. By default, files named [filename].module.jess or [filename].m.jess are treated as modules and class names are hashed.
compile.plugins
Add compile-time plugins used by the compiler (for language/runtime extensions). This is separate from bundler plugins such as rollup-plugin-jess.
lint
Configure jess lint and the @jesscss/lint API.
// styles.config.js
export default {
lint: {
files: ['src/**/*.{css,less,scss,jess}'],
ignoreFiles: ['dist/**'],
reportSyntax: true,
rules: {
'property-no-unknown': 'error',
'length-zero-no-unit': 'warn',
'jess/unsupported-sass-form': 'warn'
}
}
}
files supplies the default glob set when jess lint is run without positional
patterns. ignoreFiles excludes generated or vendored stylesheets.
reportSyntax controls whether parser diagnostics are surfaced through lint.
Per-rule values are off, warn, and error; null also disables a rule.
Jess uses Stylelint rule names where the rule intent is familiar and Jess-owned
namespaces for Jess-only checks.
Jess lint uses this policy on top of shared diagnostics. Detection itself lives below the lint package, so a diagnostic can be reused by the CLI and the language service instead of being implemented twice.