Skip to content

Commit

Permalink
chore: sync config files
Browse files Browse the repository at this point in the history
  • Loading branch information
unicornware committed Mar 2, 2023
1 parent a0450f9 commit 5bbf830
Show file tree
Hide file tree
Showing 33 changed files with 447 additions and 403 deletions.
29 changes: 29 additions & 0 deletions .commitlintrc.cts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/**
* @file Configuration - commitlint
* @module config/commitlint
* @see https://commitlint.js.org
*/

import {
RuleConfigSeverity as Severity,
type UserConfig
} from '@commitlint/types'
import { scopes } from '@flex-development/commitlint-config'

/**
* `commitlint` configuration object.
*
* @const {UserConfig} config
*/
const config: UserConfig = {
extends: ['@flex-development'],
rules: {
'scope-enum': [
Severity.Error,
'always',
scopes(['analyze', 'docs', 'resolve', 'specifiers', 'syntax'])
]
}
}

export default config
69 changes: 0 additions & 69 deletions .commitlintrc.json

This file was deleted.

1 change: 1 addition & 0 deletions .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"failFast": false,
"flagWords": [],
"ignorePaths": [
"**/*.log",
"**/*.snap",
"**/.*ignore",
"**/.gitconfig",
Expand Down
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ yarn.lock
!**/__fixtures__/**/node_modules/
!**/typings/**/dist/
!.codecov.yml
!.commitlintrc.json
!.commitlintrc.*
!.cspell.json
!.github/
!.graphqlrc.yml
Expand Down
59 changes: 55 additions & 4 deletions .eslintrc.base.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const config = {
parser: '@typescript-eslint/parser',
parserOptions: {
extraFileExtensions: ['.vue'],
project: './tsconfig.json',
project: ['./tsconfig.json', './tsconfig.cjs.json'],
sourceType: require('./package.json').type,
tsconfigRootDir: process.cwd(),
warnOnUnsupportedTypeScriptVersion: true
Expand Down Expand Up @@ -717,7 +717,7 @@ const config = {
'unicorn/no-static-only-class': 0,
'unicorn/no-thenable': 2,
'unicorn/no-this-assignment': 2,
'unicorn/no-unreadable-array-destructuring': 2,
'unicorn/no-unreadable-array-destructuring': 0,
'unicorn/no-unsafe-regex': 0,
'unicorn/no-unused-properties': 2,
'unicorn/no-useless-fallback-in-spread': 2,
Expand Down Expand Up @@ -905,7 +905,7 @@ const config = {
}
},
{
files: '**/*.+(json|jsonc)',
files: '**/*.+(json|json5|jsonc)',
parser: 'jsonc-eslint-parser',
plugins: ['jsonc'],
rules: {
Expand Down Expand Up @@ -980,7 +980,7 @@ const config = {
}
},
{
files: ['**/*.jsonc', 'tsconfig*.json'],
files: ['**/*.+(json5|jsonc)', 'tsconfig*.json'],
rules: {
'jsonc/no-comments': 0
}
Expand All @@ -991,6 +991,57 @@ const config = {
plugins: ['markdown', 'markdownlint'],
processor: 'markdown/markdown'
},
{
files: '**/*.md/*.+(cjs|cts|js|jsx|mjs|mts|ts|tsx)',
parserOptions: { project: false },
rules: {
'@typescript-eslint/await-thenable': 0,
'@typescript-eslint/consistent-type-exports': 0,
'@typescript-eslint/dot-notation': 0,
'@typescript-eslint/naming-convention': 0,
'@typescript-eslint/no-base-to-string': 0,
'@typescript-eslint/no-confusing-void-expression': 0,
'@typescript-eslint/no-floating-promises': 0,
'@typescript-eslint/no-for-in-array': 0,
'@typescript-eslint/no-implied-eval': 0,
'@typescript-eslint/no-meaningless-void-operator': 0,
'@typescript-eslint/no-misused-promises': 0,
'@typescript-eslint/no-mixed-enums': 0,
'@typescript-eslint/no-redundant-type-constituents': 0,
'@typescript-eslint/no-throw-literal': 0,
'@typescript-eslint/no-unnecessary-boolean-literal-compare': 0,
'@typescript-eslint/no-unnecessary-condition': 0,
'@typescript-eslint/no-unnecessary-qualifier': 0,
'@typescript-eslint/no-unnecessary-type-arguments': 0,
'@typescript-eslint/no-unnecessary-type-assertion': 0,
'@typescript-eslint/no-unsafe-argument': 0,
'@typescript-eslint/no-unsafe-assignment': 0,
'@typescript-eslint/no-unsafe-call': 0,
'@typescript-eslint/no-unsafe-member-access': 0,
'@typescript-eslint/no-unsafe-return': 0,
'@typescript-eslint/no-unused-expressions': 0,
'@typescript-eslint/non-nullable-type-assertion-style': 0,
'@typescript-eslint/prefer-includes': 0,
'@typescript-eslint/prefer-nullish-coalescing': 0,
'@typescript-eslint/prefer-readonly': 0,
'@typescript-eslint/prefer-readonly-parameter-types': 0,
'@typescript-eslint/prefer-reduce-type-parameter': 0,
'@typescript-eslint/prefer-regexp-exec': 0,
'@typescript-eslint/prefer-return-this-type': 0,
'@typescript-eslint/prefer-string-starts-ends-with': 0,
'@typescript-eslint/promise-function-async': 0,
'@typescript-eslint/require-array-sort-compare': 0,
'@typescript-eslint/require-await': 0,
'@typescript-eslint/restrict-plus-operands': 0,
'@typescript-eslint/restrict-template-expressions': 0,
'@typescript-eslint/return-await': 0,
'@typescript-eslint/strict-boolean-expressions': 0,
'@typescript-eslint/switch-exhaustiveness-check': 0,
'@typescript-eslint/unbound-method': 0,
'jsdoc/require-file-overview': 0,
'unicorn/filename-case': 0
}
},
{
files: '**/*.yml',
parser: 'yaml-eslint-parser',
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,9 @@ jobs:
with:
key: ${{ runner.os }}-${{ github.run_id }}
path: ${{ env.CACHE_PATH }}
- id: build
name: Build project
run: yarn build
- id: lint
name: Check lint status
run: yarn check:lint
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ codecov
# ------------------------------------------------------------------------------
**/.temp/
**/dist/
!**/__fixtures__/**/*.log
!**/__fixtures__/**/dist/
!**/typings/**/dist/

Expand All @@ -71,4 +72,4 @@ RELEASE_NOTES.md

# Misc
# ------------------------------------------------------------------------------
**/scratch.ts
**/scratch.*
2 changes: 1 addition & 1 deletion .husky/commit-msg
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
# - https://typicode.github.io/husky/?id=husky_git_params-ie-commitlint-#/?id=husky_git_params-ie-commitlint-

yarn build
commitlint --edit $1
yarn commitlint --edit $1
4 changes: 2 additions & 2 deletions .lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"*": ["prettier --check", "cspell lint --color --no-progress --relative $@"],
"**/*.{cjs,gql,js,json,jsonc,md,mjs,mts,ts,vue,yml}": [
"**/*.{cjs,cts,gql,js,json,json5,jsonc,md,mjs,mts,ts,vue,yml}": [
"eslint --exit-on-fatal-error"
],
"**/*.{cjs,js,mjs,mts,ts,vue}": "vitest typecheck --changed --run",
"**/*.{cts,mts,ts,vue}": "vitest typecheck --changed --run",
"**/yarn.lock": "yarn dedupe --check",
"src/**/*.ts": "vitest --changed --coverage --run"
}
8 changes: 7 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@
"yaml"
],
"files.associations": {
"*.log": "log",
"*.snap": "jest-snapshot",
".env.zsh": "shellscript",
".markdownlintignore": "ignore",
Expand Down Expand Up @@ -316,6 +317,11 @@
"volar.doctor.statusBarItem": true,
"volar.vueserver.vitePress.processMdFile": true,
"vsicons.associations.files": [
{
"extensions": [".commitlintrc.cts"],
"format": "svg",
"icon": "commitlint"
},
{
"extensions": [".eslintrc.base.cjs"],
"format": "svg",
Expand All @@ -327,7 +333,7 @@
"icon": "graphql"
},
{
"extensions": ["build.json", "typecheck.json"],
"extensions": ["build.json", "cjs.json", "typecheck.json"],
"format": "svg",
"icon": "tsconfig"
},
Expand Down
10 changes: 0 additions & 10 deletions __fixtures__/aggregate-error-ponyfill.cjs

This file was deleted.

7 changes: 7 additions & 0 deletions __fixtures__/aggregate-error-ponyfill.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* @file Fixtures - aggregate-error-ponyfill
* @module fixtures/aggregate-error-ponyfill
* @see https://github.com/flex-development/aggregate-error-ponyfill/tree/2.0.1
*/

export default 'var y=Object.create;var a=Object.defineProperty;var T=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var A=Object.getPrototypeOf,M=Object.prototype.hasOwnProperty;var b=(r,t,e)=>t in r?a(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e;var E=(r,t)=>{for(var e in t)a(r,e,{get:t[e],enumerable:!0})},n=(r,t,e,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of u(t))!M.call(r,s)&&s!==e&&a(r,s,{get:()=>t[s],enumerable:!(i=T(t,s))||i.enumerable});return r};var o=(r,t,e)=>(e=r!=null?y(A(r)):{},n(t||!r||!r.__esModule?a(e,"default",{value:r,enumerable:!0}):e,r)),x=r=>n(a({},"__esModule",{value:!0}),r);var m=(r,t,e)=>(b(r,typeof t!="symbol"?t+"":t,e),e);var v={};E(v,{default:()=>O});module.exports=x(v);var d=o(require("es-abstract/2021/AdvanceStringIndex.js")),h=o(require("es-abstract/2021/CreateDataPropertyOrThrow.js")),f=o(require("es-abstract/2021/GetMethod.js")),I=o(require("es-abstract/2021/IsArray.js")),p=o(require("es-abstract/2021/IterableToList.js")),c=o(require("es-abstract/2021/Type.js")),l=o(require("es-abstract/helpers/getIteratorMethod.js"));class G extends Error{constructor(e,i){super(i);m(this,"errors");m(this,"name","AggregateError");const g=(0,l.default)({AdvanceStringIndex:d.default,GetMethod:f.default,IsArray:I.default,Type:c.default},e);this.errors=(0,p.default)(e,g),(0,h.default)(this,"errors",(0,p.default)(this.errors,g))}}var O=G;'
7 changes: 2 additions & 5 deletions __tests__/ts/v4/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@
"#fixtures/*": ["__fixtures__/*"],
"#src": ["src/index"],
"#src/*": ["src/*"],
"#tests/*": ["__tests__/*"],
"@flex-development/mlly": ["src/index"]
"#tests/*": ["__tests__/*"]
},
"plugins": [{ "name": "@vuedx/typescript-plugin-vue" }],
"preserveConstEnums": true,
Expand All @@ -53,12 +52,10 @@
},
"exclude": ["**/coverage", "**/dist", "**/node_modules"],
"include": [
"**/**.cjs",
"**/**.js",
"**/**.mjs",
"**/**.mts",
"**/**.ts",
"**/.*.cjs",
"**/__fixtures__/**/*.js",
"**/docs/.vitepress/**/*.ts",
"**/docs/.vitepress/**/*.vue"
]
Expand Down
12 changes: 11 additions & 1 deletion __tests__/ts/v4/tsconfig.typecheck.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,15 @@
"compilerOptions": {
"target": "es2020"
},
"extends": "./tsconfig.json"
"extends": "./tsconfig.json",
"include": [
"**/**.cts",
"**/**.mts",
"**/**.ts",
"**/.*.cts",
"**/.*.mts",
"**/.*.ts",
"**/docs/.vitepress/**/*.ts",
"**/docs/.vitepress/**/*.vue"
]
}
1 change: 1 addition & 0 deletions build.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/**
* @file Configuration - Build
* @module config/build
* @see https://github.com/flex-development/mkbuild
*/

import { defineBuildConfig, type Config } from '@flex-development/mkbuild'
Expand Down
Loading

0 comments on commit 5bbf830

Please sign in to comment.