Skip to content

Configs Reference

License NPM Version Open Issues

⚙️ Shared project configuration files for linting, formatting, documentation and so on.

Configurations

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:

// .changeset/config.json
{
	"$schema": "https://raw.githubusercontent.com/changesets/changesets/main/packages/config/schema.json",
	"changelog": "@lou.codes/configs/changelog.cjs",
	"commit": false,
	"access": "restricted",
	"baseBranch": "main",
	"updateInternalDependencies": "patch"
}
// eslint.config.js
export { default } from "@lou.codes/configs/eslint.config.js";
// prettier.config.js
export { default } from "@lou.codes/configs/prettier.config.js";
// stylelint.config.js
export { default } from "@lou.codes/configs/stylelint.config.js";
// tsconfig.json
{
	"extends": "@lou.codes/configs/typescript.config.json"
}
// typedoc.json
{
	"$schema": "https://typedoc.org/schema.json",
	"cname": "PUBLIC DOMAIN",
	"entryPoints": ["./lib"],
	"extends": ["@lou.codes/configs/typedoc.config.json"],
	"name": "PACKAGE NAME"
}
  • Changelog: List of changes between versions.

Variables

eslintConfig

const eslintConfig: readonly [
	object,
	object,
	object,
	object,
	object,
	object,
	object,
	object,
];

typedocConfig

typedocConfig: object;

Type declaration

MemberTypeValue
$schemastringhttps://typedoc.org/schema.json
disableSourcesbooleantrue
entryPointsstring[]
extendsstring[]

typescriptConfig

typescriptConfig: object;

Type declaration

MemberTypeValue
$schemastringhttps://json.schemastore.org/tsconfig
compilerOptionsobject
compilerOptions.allowJsbooleantrue
compilerOptions.checkJsbooleantrue
compilerOptions.declarationbooleantrue
compilerOptions.exactOptionalPropertyTypesbooleantrue
compilerOptions.forceConsistentCasingInFileNamesbooleantrue
compilerOptions.jsxstring”react-jsx”
compilerOptions.modulestring”NodeNext”
compilerOptions.moduleResolutionstring”NodeNext”
compilerOptions.newLinestring”LF”
compilerOptions.noEmitOnErrorbooleantrue
compilerOptions.noFallthroughCasesInSwitchbooleantrue
compilerOptions.noImplicitOverridebooleantrue
compilerOptions.noImplicitReturnsbooleantrue
compilerOptions.noUncheckedIndexedAccessbooleantrue
compilerOptions.noUnusedLocalsbooleantrue
compilerOptions.noUnusedParametersbooleantrue
compilerOptions.preserveSymlinksbooleantrue
compilerOptions.resolveJsonModulebooleantrue
compilerOptions.skipLibCheckbooleantrue
compilerOptions.strictbooleantrue
compilerOptions.targetstring”ESNext”
compilerOptions.verbatimModuleSyntaxbooleantrue

Namespace: changesetsConfig

Functions

getDependencyReleaseLine()

function getDependencyReleaseLine(
	_changesets: NewChangesetWithCommit[],
	dependenciesUpdated: ModCompWithPackage[],
): Promise<string>;
Parameters
ParameterType
_changesetsNewChangesetWithCommit[]
dependenciesUpdatedModCompWithPackage[]
Returns

Promise<string>


getReleaseLine()

function getReleaseLine(
	__namedParameters: NewChangesetWithCommit,
): Promise<string>;
Parameters
ParameterType
__namedParametersNewChangesetWithCommit
Returns

Promise<string>

Namespace: prettierConfig

Variables

arrowParens

arrowParens: "avoid";

bracketSameLine

bracketSameLine: false;

bracketSpacing

bracketSpacing: true;

embeddedLanguageFormatting

embeddedLanguageFormatting: "auto";

endOfLine

endOfLine: "lf";

experimentalTernaries

experimentalTernaries: true;

htmlWhitespaceSensitivity

htmlWhitespaceSensitivity: "strict";

jsxSingleQuote

jsxSingleQuote: false;

printWidth

printWidth: 80;

proseWrap

proseWrap: "always";

quoteProps

quoteProps: "as-needed";

semi

semi: true;

singleAttributePerLine

singleAttributePerLine: false;

singleQuote

singleQuote: false;

tabWidth

tabWidth: 4;

trailingComma

trailingComma: "all";

useTabs

useTabs: true;

vueIndentScriptAndStyle

vueIndentScriptAndStyle: true;

Namespace: stylelintConfig

Variables

defaultSeverity

defaultSeverity: "error";

extends

extends: ["stylelint-prettier/recommended"];

plugins

plugins: [Plugin];

rules

rules: object;
Type declaration
MemberTypeDescription
alpha-value-notation"number"Alpha-values must always use the number notation.

See
alpha-value-notation
at-rule-empty-line-beforereadonly ["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-importanttrueDisallow !important within declarations.

See
declaration-no-important
declaration-property-value-no-unknowntrueDisallow 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-relativetrueDisallow 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-listreadonly ["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-unittrueDisallow 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-ordertrueKeep properties in alphabetical order.

See
order/properties-alphabetical-order
rule-empty-line-beforereadonly ["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-id1Limit 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-valuestrueDisallow redundant values within shorthand properties.

See
shorthand-property-no-redundant-values
value-keyword-casereadonly ["lower", object]Specify lowercase for keywords values (camel for SVG keywords).

See
value-keyword-case