version bump and build

This commit is contained in:
2025-07-15 14:39:37 +02:00
parent 21c31445c3
commit 6e769bad4b
6 changed files with 149 additions and 118 deletions

View File

@@ -1,7 +0,0 @@
*.scss
*.d.ts
*.spec.ts
main.browser.ts
idex.js
node_modules/*
*.e2e.*

View File

@@ -1,62 +0,0 @@
{
"env": {
"browser": true,
"jest": true,
"es6": true,
},
"plugins": ["import"],
"extends": ["eslint:recommended", "prettier"],
"parserOptions": {
"ecmaVersion": 2020,
"sourceType": "module"
},
"rules": {
"no-console": [
"error",
{
"allow": ["debug", "error"]
}
],
"no-eval": "error",
"import/first": "error",
"camelcase": [
"error",
{
"ignoreImports": true,
"ignoreDestructuring": true
}
],
"consistent-return": "warn",
"comma-dangle": ["warn", "always-multiline"],
"constructor-super": "error",
"curly": "error",
"eol-last": "warn",
"eqeqeq": ["error", "smart"],
"import/order": "always",
"new-parens": "error",
"no-debugger": "error",
"no-fallthrough": "off",
"max-len": [
"warn",
{
"code": 100
}
],
"no-shadow": [
"error",
{
"hoist": "all"
}
],
"no-trailing-spaces": "warn",
"no-underscore-dangle": "error",
"no-unsafe-finally": "error",
"no-var": "error",
"object-shorthand": "error",
"one-var": ["error", "never"],
"prefer-arrow/prefer-arrow-functions": "off",
"prefer-const": "error",
"radix": "off",
"space-in-parens": ["off", "never"]
}
}

View File

@@ -1,4 +1,5 @@
{
"defaultSeverity": "error",
"extends": [
"stylelint-config-standard",
"stylelint-config-recommended-scss",
@@ -12,9 +13,6 @@
"except": ["empty"]
}
],
"declaration-empty-line-before":[
"never",
],
"comment-empty-line-before": [
"always",
{
@@ -27,7 +25,6 @@
"color-hex-length": "long",
"selector-pseudo-element-colon-notation": "single",
"selector-attribute-quotes": "always",
"string-quotes": "double",
"max-nesting-depth": 3,
"selector-max-specificity": "0,3,2",
"declaration-no-important": true,
@@ -54,7 +51,15 @@
}
],
"unit-allowed-list": ["px", "%", "em", "rem", "vw", "vh", "deg", "s"],
"max-empty-lines": 2,
"max-line-length": 120
"color-named": "never",
"font-family-no-missing-generic-family-keyword": null,
"font-weight-notation": "named-where-possible",
"function-url-no-scheme-relative": true,
"no-descending-specificity": true,
"no-duplicate-selectors": true,
"order/order": [["custom-properties", "declarations"]],
"order/properties-alphabetical-order": true,
"property-no-unknown": [true, { "ignoreProperties": ["/^lost-/"] }],
"value-keyword-case": "lower"
}
}

64
eslint.config.js Normal file
View File

@@ -0,0 +1,64 @@
const mastermindzhConfig = require("@mastermindzh/eslint-config");
const typescriptEslint = require("@typescript-eslint/eslint-plugin");
const typescriptParser = require("@typescript-eslint/parser");
const importPlugin = require("eslint-plugin-import");
module.exports = [
// Global ignores (replaces .eslintignore)
{
ignores: [
"dist/**",
"build/**",
"public/**",
".cache/**",
"node_modules/**",
"*.config.js",
"*.config.ts",
],
},
...mastermindzhConfig,
{
// Only lint TypeScript files (matching your .eslintignore pattern)
files: ["**/*.ts", "**/*.tsx"],
languageOptions: {
parser: typescriptParser,
parserOptions: {
project: "./tsconfig.json",
},
},
plugins: {
"@typescript-eslint": typescriptEslint,
import: importPlugin,
},
// Your project-specific rules
rules: {
// Import rules
"import/no-extraneous-dependencies": [
"error",
{
devDependencies: [
"**/*.test.ts",
"**/*.test.tsx",
"**/internal/**/*.ts",
],
},
],
// TypeScript rules
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/no-use-before-define": "off",
// Use the correct rule name for quotes
quotes: ["error", "double"],
"@typescript-eslint/naming-convention": [
"error",
{
format: ["camelCase", "UPPER_CASE", "snake_case", "PascalCase"],
leadingUnderscore: "allow",
selector: "parameter",
},
],
// Shadow rules
"no-shadow": "off",
"@typescript-eslint/no-shadow": "error",
},
},
];

View File

@@ -1,43 +1,57 @@
module.exports = {
// line length
// Line length - optimized for modern development
printWidth: 100,
// indentation type
// Use spaces instead of tabs for consistency
useTabs: false,
// whether to prefer ' over "
singleQuote: false,
// whether we want to quote props (only-if-they-have-a-dash)
quoteProps: "as-needed",
// add trailing comma's everwhere as long as it's supported by es5
trailingComma: "es5",
// space brackets method ( param1, param2 ) { }
bracketSpacing: true,
// places the > sign on a newline when closing a long html tag
jsxBracketSameLine: false,
// always add parentheses on arrow functions (x) => { }
arrowParens: "always",
// ignore pragma, run prettier on all files
requirePragma: false,
// preserve markdown text as-is
proseWrap: "preserve",
// make css leading in whitespace sensitivity
htmlWhitespaceSensitivity: "css",
// always end lines with lf
endOfLine: "lf",
// tabs are 2 spaces.
tabWidth: 2,
// always end statements with a semicolon
semi: true
// Use double quotes for consistency with JSON and HTML attributes
singleQuote: false,
// JSX quotes - use double quotes to match regular quotes
jsxSingleQuote: false,
// Only quote object properties when needed
quoteProps: "as-needed",
// Use trailing commas for all ES2017+ features (better for git diffs)
trailingComma: "all",
// Add spaces inside object braces { foo: bar }
bracketSpacing: true,
// Put closing > on new line for JSX elements (better readability)
bracketSameLine: false,
// Always use parentheses around arrow function parameters for consistency
arrowParens: "always",
// Format all files, don't require pragma comments
requirePragma: false,
insertPragma: false,
// Preserve markdown line breaks as-is (better for documentation)
proseWrap: "preserve",
// CSS whitespace handling - strict for better consistency
htmlWhitespaceSensitivity: "css",
// Consistent line endings across platforms
endOfLine: "lf",
// Always include semicolons for clarity and consistency
semi: true,
// Don't force single attribute per line (allows flexibility)
singleAttributePerLine: false,
// Format embedded languages automatically
embeddedLanguageFormatting: "auto",
// Experimental: Control Vue SFC formatting
vueIndentScriptAndStyle: false,
// Enhanced experimental features for future-proofing
experimentalTernaries: false,
};

View File

@@ -1,13 +1,20 @@
{
"name": "@mastermindzh/prettier-config",
"version": "1.0.0",
"description": "My preferred prettier config",
"version": "1.1.0",
"description": "My preferred prettier config with modern best practices",
"main": "index.js",
"type": "commonjs",
"engines": {
"node": ">=20.0.0"
},
"peerDependencies": {
"prettier": ">=3.0.0"
},
"scripts": {
"patch": "npm --no-git-tag-version version patch",
"minor": "npm --no-git-tag-version version minor",
"major": "npm --no-git-tag-version version major",
"release": "git add -A && git commit -m 'version bump and build' && npm publish --access public && echo 'All done, don't forget to push!'",
"release": "git add -A && git commit -m \"version bump and build\" && npm publish --access public && echo \"All done, don't forget to push!\"",
"release-patch": "npm run patch && npm run release",
"release-minor": "npm run minor && npm run release",
"release-major": "npm run major && npm run release"
@@ -19,14 +26,24 @@
"keywords": [
"prettier",
"config",
"configuration",
"code-style",
"formatting",
"javascript",
"typescript",
"react",
"vue",
"mastermindzh",
"rick van lieshout",
"lieshout"
"rick van lieshout"
],
"author": "Rick van Lieshout",
"license": "MIT",
"bugs": {
"url": "https://github.com/Mastermindzh/prettier-config/issues"
},
"homepage": "https://github.com/Mastermindzh/prettier-config#readme"
"homepage": "https://github.com/Mastermindzh/prettier-config#readme",
"files": [
"index.js",
"README.md"
]
}