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
1
{
2
"$schema": "https://raw.githubusercontent.com/changesets/changesets/main/packages/config/schema.json",
3
"changelog": "@lou.codes/configs/changelog.cjs",
4
"commit": false,
5
"access": "restricted",
6
"baseBranch": "main",
7
"updateInternalDependencies": "patch"
8
}
eslint.config.js
1
export { default } from "@lou.codes/configs/eslint.config.js";
prettier.config.js
1
export { default } from "@lou.codes/configs/prettier.config.js";
stylelint.config.js
1
export { default } from "@lou.codes/configs/stylelint.config.js";
tsconfig.json
1
{
2
"extends": "@lou.codes/configs/typescript.config.json"
3
}
typedoc.json
1
{
2
"$schema": "https://typedoc.org/schema.json",
3
"cname": "PUBLIC DOMAIN",
4
"entryPoints": ["./lib"],
5
"extends": ["@lou.codes/configs/typedoc.config.json"],
6
"name": "PACKAGE NAME"
7
}
  • Changelog: List of changes between versions.

Variables

eslintConfig

1
const eslintConfig: readonly [
2
object,
3
object,
4
object,
5
object,
6
object,
7
object,
8
object,
9
object,
10
];

typedocConfig

1
typedocConfig: object;

Type declaration

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

typescriptConfig

1
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()

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

Promise<string>


getReleaseLine()

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

Promise<string>

Namespace: prettierConfig

Variables

arrowParens

1
arrowParens: "avoid";

bracketSameLine

1
bracketSameLine: false;

bracketSpacing

1
bracketSpacing: true;

embeddedLanguageFormatting

1
embeddedLanguageFormatting: "auto";

endOfLine

1
endOfLine: "lf";

experimentalTernaries

1
experimentalTernaries: true;

htmlWhitespaceSensitivity

1
htmlWhitespaceSensitivity: "strict";

jsxSingleQuote

1
jsxSingleQuote: false;

printWidth

1
printWidth: 80;

proseWrap

1
proseWrap: "always";

quoteProps

1
quoteProps: "as-needed";

semi

1
semi: true;

singleAttributePerLine

1
singleAttributePerLine: false;

singleQuote

1
singleQuote: false;

tabWidth

1
tabWidth: 4;

trailingComma

1
trailingComma: "all";

useTabs

1
useTabs: true;

vueIndentScriptAndStyle

1
vueIndentScriptAndStyle: true;

Namespace: stylelintConfig

Variables

defaultSeverity

1
defaultSeverity: "error";

extends

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

plugins

1
plugins: [Plugin];

rules

1
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