Configs Reference
⚙️ Shared project configuration files for linting, formatting, documentation and so on.
Configurations
- 🦋 changelog.cjs — Changesets changelog functions.
- 🚨 eslint.config.js — JavaScript and TypeScript linting.
- ✨ prettier.config.js — Code formatting.
- 🎨 stylelint.config.js — CSS linting.
- 🏷️ typescript.config.json — TypeScript configuration (strict).
- 📖 typedoc.config.json — Documentation configuration.
Usage
All this configurations are setup automatically by @lou.codes/create-package when creating a new package.
For manual setup of each file, use the examples below:
Useful links
- ⏳ Changelog: List of changes between versions.
Variables
eslintConfig
typedocConfig
Type declaration
Member | Type | Value |
---|---|---|
$schema | string | ”https://typedoc.org/schema.json” |
disableSources | boolean | true |
entryPoints | string [] | … |
extends | string [] | … |
typescriptConfig
Type declaration
Member | Type | Value |
---|---|---|
$schema | string | ”https://json.schemastore.org/tsconfig” |
compilerOptions | object | … |
compilerOptions.allowJs | boolean | true |
compilerOptions.checkJs | boolean | true |
compilerOptions.declaration | boolean | true |
compilerOptions.exactOptionalPropertyTypes | boolean | true |
compilerOptions.forceConsistentCasingInFileNames | boolean | true |
compilerOptions.jsx | string | ”react-jsx” |
compilerOptions.module | string | ”NodeNext” |
compilerOptions.moduleResolution | string | ”NodeNext” |
compilerOptions.newLine | string | ”LF” |
compilerOptions.noEmitOnError | boolean | true |
compilerOptions.noFallthroughCasesInSwitch | boolean | true |
compilerOptions.noImplicitOverride | boolean | true |
compilerOptions.noImplicitReturns | boolean | true |
compilerOptions.noUncheckedIndexedAccess | boolean | true |
compilerOptions.noUnusedLocals | boolean | true |
compilerOptions.noUnusedParameters | boolean | true |
compilerOptions.preserveSymlinks | boolean | true |
compilerOptions.resolveJsonModule | boolean | true |
compilerOptions.skipLibCheck | boolean | true |
compilerOptions.strict | boolean | true |
compilerOptions.target | string | ”ESNext” |
compilerOptions.verbatimModuleSyntax | boolean | true |
Namespace: changesetsConfig
Functions
getDependencyReleaseLine()
Parameters
Parameter | Type |
---|---|
_changesets | NewChangesetWithCommit [] |
dependenciesUpdated | ModCompWithPackage [] |
Returns
Promise
<string
>
getReleaseLine()
Parameters
Parameter | Type |
---|---|
__namedParameters | NewChangesetWithCommit |
Returns
Promise
<string
>
Namespace: prettierConfig
Variables
arrowParens
bracketSameLine
bracketSpacing
embeddedLanguageFormatting
endOfLine
experimentalTernaries
htmlWhitespaceSensitivity
jsxSingleQuote
printWidth
proseWrap
quoteProps
semi
singleAttributePerLine
singleQuote
tabWidth
trailingComma
useTabs
vueIndentScriptAndStyle
Namespace: stylelintConfig
Variables
defaultSeverity
extends
plugins
rules
Type declaration
Member | Type | Description |
---|---|---|
alpha-value-notation | "number" | Alpha-values must always use the number notation. See alpha-value-notation |
at-rule-empty-line-before | readonly ["always" , object ] | There must always be an empty line before at-rules. See at-rule-empty-line-before |
color-function-notation | "modern" | Applicable color-functions must always use modern notation. See color-function-notation |
color-hex-length | "short" | Specify short notation for hex colors. See color-hex-length |
color-named | "never" | Colors must never be named. See color-named |
custom-property-pattern | "^[a-z][a-z0-9-]*$" | Specify a pattern for custom properties. See custom-property-pattern |
declaration-no-important | true | Disallow !important within declarations. See declaration-no-important |
declaration-property-value-no-unknown | true | Disallow unknown values for properties within declarations. See declaration-property-value-no-unknown |
font-weight-notation | "numeric" | Font weight values must always be numbers. See font-weight-notation |
function-name-case | "lower" | Specify lowercase for function names. See function-name-case |
function-url-no-scheme-relative | true | Disallow scheme-relative urls. See function-url-no-scheme-relative |
function-url-quotes | "always" | Disallow quotes for urls. See function-url-quotes |
function-url-scheme-allowed-list | readonly ["data" , "/^http/" ] | Specify a list of allowed URL schemes. See function-url-scheme-allowed-list |
hue-degree-notation | "angle" | Degree hues must always use angle notation. See hue-degree-notation |
import-notation | "url" | @import rules must always use URL notation.See import-notation |
keyframe-selector-notation | "keyword" | Keyframe selectors must always use the keyword notation. See keyframe-selector-notation |
keyframes-name-pattern | "^[a-z][a-z0-9-]*$" | Specify a pattern for keyframe names. See keyframes-name-pattern |
length-zero-no-unit | true | Disallow units for zero lengths. See length-zero-no-unit |
media-feature-range-notation | "context" | Media feature ranges must always use context notation. See media-feature-range-notation |
order/properties-alphabetical-order | true | Keep properties in alphabetical order. See order/properties-alphabetical-order |
rule-empty-line-before | readonly ["always" , object ] | There must always be an empty line before rules. See rule-empty-line-before |
selector-attribute-quotes | "always" | Attribute values must never be quoted. See selector-attribute-quotes |
selector-max-id | 1 | Limit the number of ID selectors in a selector. See selector-max-id |
selector-not-notation | "complex" | Specify complex notation for :not
() pseudo-class selectors. See selector-not-notation |
selector-pseudo-element-colon-notation | "double" | Applicable pseudo-elements must always use the double colon notation. See selector-pseudo-element-colon-notation |
selector-type-case | "lower" | Specify lowercase for type selectors. See selector-type-case |
shorthand-property-no-redundant-values | true | Disallow redundant values within shorthand properties. See shorthand-property-no-redundant-values |
value-keyword-case | readonly ["lower" , object ] | Specify lowercase for keywords values (camel for SVG keywords). See value-keyword-case |