Skip to content
This repository has been archived by the owner on Feb 5, 2024. It is now read-only.

Commit

Permalink
Add test tsconfig for mocha
Browse files Browse the repository at this point in the history
  • Loading branch information
MrEssex committed Nov 21, 2023
1 parent d8cc06c commit bbd5978
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 30 deletions.
58 changes: 29 additions & 29 deletions .stylelintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
const {interaction} = require('stylelint-config-clean-order/src/groups/interaction');
const {positioning} = require('stylelint-config-clean-order/src/groups/positioning');
const {layout} = require('stylelint-config-clean-order/src/groups/layout');
const {boxModel} = require('stylelint-config-clean-order/src/groups/box-model');
const {typography} = require('stylelint-config-clean-order/src/groups/typography');
const {apperance} = require('stylelint-config-clean-order/src/groups/apperance');
const {svgPresentation} = require('stylelint-config-clean-order/src/groups/svg-presentation');
const {transition} = require('stylelint-config-clean-order/src/groups/transition');
const { interaction } = require("stylelint-config-clean-order/src/groups/interaction");
const { positioning } = require("stylelint-config-clean-order/src/groups/positioning");
const { layout } = require("stylelint-config-clean-order/src/groups/layout");
const { boxModel } = require("stylelint-config-clean-order/src/groups/box-model");
const { typography } = require("stylelint-config-clean-order/src/groups/typography");
const { apperance } = require("stylelint-config-clean-order/src/groups/apperance");
const { svgPresentation } = require("stylelint-config-clean-order/src/groups/svg-presentation");
const { transition } = require("stylelint-config-clean-order/src/groups/transition");

const propertyGroups = [
['all'],
["all"],
interaction,
positioning,
layout,
Expand All @@ -21,37 +21,37 @@ const propertyGroups = [

const propertiesOrder = propertyGroups.map((properties) => ({
noEmptyLineBetween: true,
emptyLineBefore: 'never', // Don't add empty lines between order groups.
emptyLineBefore: "never", // Don't add empty lines between order groups.
properties
}));

module.exports = {
'extends': [
'stylelint-config-standard',
'stylelint-config-sass-guidelines',
'stylelint-config-clean-order'
"extends": [
"stylelint-config-standard",
"stylelint-config-sass-guidelines",
"stylelint-config-clean-order"
],
'rules': {
'max-nesting-depth': 3,
'at-rule-empty-line-before': [
'always',
"rules": {
"max-nesting-depth": 3,
"at-rule-empty-line-before": [
"always",
{
ignore: [
'first-nested',
'blockless-after-same-name-blockless',
'after-comment',
"else"
]
"first-nested",
"blockless-after-same-name-blockless",
"after-comment"
],
ignoreAtRules: ["else"]
}
],
'order/properties-order': [propertiesOrder, {severity: 'warning', unspecified: 'bottomAlphabetical'}],
'scss/at-rule-no-unknown': null,
'selector-no-qualifying-type': null,
'media-query-no-invalid': null,
"order/properties-order": [propertiesOrder, { severity: "warning", unspecified: "bottomAlphabetical" }],
"scss/at-rule-no-unknown": null,
"selector-no-qualifying-type": null,
"media-query-no-invalid": null,
"block-closing-brace-newline-after": [
"always", {
"ignoreAtRules": [ "if", "else" ]
ignoreAtRules: ["if", "else"]
}
],
]
}
};
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"lint": "npm run lint:ts && npm run lint:css",
"lint:css": "stylelint assets/scss/**/*.scss",
"lint:ts": "eslint --ext .ts,.tsx assets",
"test": "mocha",
"test": "cross-env TS_NODE_PROJECT=tsconfig.test.json mocha",
"watch": "cross-env NODE_ENV=development gulp watch"
},
"browserslist": [
Expand Down
15 changes: 15 additions & 0 deletions tsconfig.test.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"compilerOptions": {
"target": "es2016",
"module": "CommonJS",
"moduleResolution": "Node",
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"strict": true,
"skipLibCheck": true,
"lib": [
"ES2016",
"DOM"
]
}
}

0 comments on commit bbd5978

Please sign in to comment.