-
Notifications
You must be signed in to change notification settings - Fork 217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Restructure Codebase #215
Restructure Codebase #215
Changes from all commits
ca08a6c
09c3e67
9e6c637
21e5999
dc8df6b
29b862b
c32dfd4
b62e6e1
48a6eaf
e246c61
6f2930b
1a82cba
a27988f
4e74235
2fb71c2
5646fd6
7b894d1
6e5dcd3
8373879
5676ca7
776fc22
a2af763
0a2be40
2246372
8c562f5
e0b302f
9b55056
34fab73
03bd8a9
fbf00cc
13d6db1
ded6c51
1e02b16
6494a33
0c343f2
ced4b6d
afb122f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,5 +3,19 @@ root = true | |
[*] | ||
indent_style = tab | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.md] | ||
indent_style = space | ||
indent_size = 2 | ||
trim_trailing_whitespace = false | ||
|
||
[*.yml] | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
[{package.json,package-lock.json}] | ||
indent_style = space | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. cursed npm-enforced defaults |
||
indent_size = 2 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,202 @@ | ||
{ | ||
"root": true, | ||
"parserOptions": { | ||
"ecmaVersion": 10, | ||
"ecmaFeatures": { | ||
"impliedStrict": true | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Some spaces in indentation in this file it looks like |
||
}, | ||
"sourceType": "module" | ||
}, | ||
"env": { | ||
"browser": true, | ||
"es6": true, | ||
"node": true | ||
}, | ||
"extends": [ | ||
"eslint:recommended" | ||
], | ||
"ignorePatterns": ["dist", "types"], | ||
"rules": { | ||
"no-extra-boolean-cast": "error", | ||
"array-bracket-spacing": [ | ||
"error", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For linting, I use |
||
"always", | ||
{ | ||
"objectsInArrays": false | ||
} | ||
], | ||
"block-spacing": ["error", "always"], | ||
"brace-style": "error", | ||
"comma-dangle": ["error", "always-multiline"], | ||
"comma-spacing": [ | ||
"error", | ||
{ | ||
"before": false, | ||
"after": true | ||
} | ||
], | ||
"comma-style": "error", | ||
"curly": "error", | ||
"computed-property-spacing": ["error", "never"], | ||
"func-call-spacing": ["error", "never"], | ||
"indent": ["error", "tab"], | ||
"key-spacing": "error", | ||
"keyword-spacing": "error", | ||
"no-whitespace-before-property": "error", | ||
"no-trailing-spaces": "error", | ||
"object-curly-spacing": ["error", "always"], | ||
"padded-blocks": ["error", "never"], | ||
"semi": ["error", "never"], | ||
"space-before-function-paren": ["error", "never"], | ||
"space-in-parens": ["error", "never"], | ||
"space-infix-ops": "error", | ||
"space-unary-ops": [ | ||
"error", | ||
{ | ||
"words": true, | ||
"nonwords": false | ||
} | ||
], | ||
"no-regex-spaces": "error", | ||
"no-unsafe-negation": "error", | ||
"dot-location": ["error", "property"], | ||
"dot-notation": "error", | ||
"no-extra-label": "error", | ||
"no-multi-spaces": [ | ||
"error", | ||
{ | ||
"exceptions": { | ||
"Property": false | ||
} | ||
} | ||
], | ||
"no-useless-return": "error", | ||
"eol-last": ["error", "always"], | ||
"linebreak-style": "error", | ||
"no-lonely-if": "error", | ||
"no-unneeded-ternary": "error", | ||
"object-curly-newline": [ | ||
"error", | ||
{ | ||
"consistent": true | ||
} | ||
], | ||
"operator-linebreak": ["error", "before"], | ||
"quote-props": ["error", "as-needed"], | ||
"quotes": ["error", "backtick"], | ||
"space-before-blocks": ["error", "always"], | ||
"spaced-comment": ["error", "always"], | ||
"template-tag-spacing": "error", | ||
"unicode-bom": "error", | ||
"arrow-body-style": ["error", "as-needed"], | ||
"arrow-parens": ["error", "always"], | ||
"arrow-spacing": "error", | ||
"generator-star-spacing": "error", | ||
"no-useless-computed-key": "error", | ||
"no-useless-rename": "error", | ||
"no-var": "error", | ||
"object-shorthand": "error", | ||
"prefer-arrow-callback": [ | ||
"error", | ||
{ | ||
"allowNamedFunctions": true | ||
} | ||
], | ||
"prefer-const": "error", | ||
"prefer-numeric-literals": "error", | ||
"prefer-spread": "error", | ||
"rest-spread-spacing": "error", | ||
"template-curly-spacing": ["error", "always"], | ||
|
||
"no-bitwise": "error", | ||
"no-console": "off", | ||
"no-debugger": "off", | ||
"no-empty": "error", | ||
"no-inner-declarations": "off", | ||
"no-undef": "error", | ||
"no-unused-vars": "warn" | ||
}, | ||
"overrides": [ | ||
{ | ||
"files": [ | ||
"**/*.ts" | ||
], | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"project": [ | ||
"./tsconfig.json", | ||
"./test/types/tsconfig.json" | ||
] | ||
}, | ||
"plugins": [ | ||
"@typescript-eslint" | ||
], | ||
"extends": [ | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:@typescript-eslint/recommended-requiring-type-checking" | ||
], | ||
"rules": { | ||
"@typescript-eslint/array-type": [ | ||
"error", | ||
{ | ||
"default": "generic" | ||
} | ||
], | ||
"@typescript-eslint/ban-types": [ | ||
"error", | ||
{ | ||
"types": { | ||
"Object": { | ||
"message": "Use object instead", | ||
"fixWith": "object" | ||
}, | ||
"object": false | ||
}, | ||
"extendDefaults": true | ||
} | ||
], | ||
"@typescript-eslint/consistent-type-imports": "error", | ||
"@typescript-eslint/prefer-interface": "off", | ||
"@typescript-eslint/no-require-imports": "error", | ||
"@typescript-eslint/no-unused-vars": "off", | ||
"@typescript-eslint/no-unused-vars-experimental": [ | ||
"warn", | ||
{ | ||
"ignoredNamesRegex": "^_", | ||
"ignoreArgsIfArgsAfterAreUsed": true | ||
} | ||
], | ||
"@typescript-eslint/no-use-before-define": [ | ||
"error", | ||
{ | ||
"functions": false, | ||
"variables": true | ||
} | ||
], | ||
|
||
"@typescript-eslint/prefer-for-of": "warn", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I detest for-of loop, personally. I don't want to get bogged down in a full audit of this eslintrc, maybe it could be pulled out to its own PR? |
||
"@typescript-eslint/prefer-includes": "warn", | ||
"@typescript-eslint/prefer-nullish-coalescing": "warn", | ||
"@typescript-eslint/prefer-optional-chain": "warn", | ||
"@typescript-eslint/prefer-string-starts-ends-with": "warn", | ||
"@typescript-eslint/prefer-ts-expect-error": "warn", | ||
"@typescript-eslint/switch-exhaustiveness-check": "warn", | ||
"@typescript-eslint/unified-signatures": "warn", | ||
|
||
"@typescript-eslint/no-explicit-any": "off", | ||
"@typescript-eslint/no-unsafe-member-access": "off", | ||
"@typescript-eslint/no-unsafe-assignment": "off", | ||
"@typescript-eslint/no-unsafe-return": "off" | ||
} | ||
}, | ||
{ | ||
"files": [ | ||
"**/test/**/*", | ||
"**/*test.ts" | ||
], | ||
"rules": { | ||
"no-unused-vars": "off" | ||
} | ||
} | ||
] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
node_modules | ||
dist/* | ||
types/* | ||
!types/legacy* |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
# [5.0.0](https://github.com/TehShrike/deepmerge/releases/tag/v5.0.0) | ||
|
||
- Breaking: Endpoint are now exported in esm style [#215](https://github.com/TehShrike/deepmerge/pull/215) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
- The main merge function is now a default export | ||
- The all merge function is now exported as "deepmergeAll" and is no longer a property on the main merge function. | ||
- Breaking: TypeScript types have been completely reworked [#215](https://github.com/TehShrike/deepmerge/pull/215) | ||
- Breaking for ES5 environments: `Object.assign` is now used to avoid mutating the `options` argument. [#167](https://github.com/TehShrike/deepmerge/pull/167) | ||
- Breaking: by default, only [plain objects](https://github.com/sindresorhus/is-plain-obj/#is-plain-obj-) will have their properties merged, with all other values being copied to the target. [#152](https://github.com/TehShrike/deepmerge/issues/152) | ||
- Breaking: the `isMergeableObject` option is renamed to `isMergeable` [#168](https://github.com/TehShrike/deepmerge/pull/168) | ||
|
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do tabs/trim-trailing-whitespace in Markdown too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My reason for switching to spaces in markdown files was just to ensure they render the same regardless of what render is being used - GitHub/npm/other.
But I don't have a strong opinion on this either way. I put this change its own commit so it can easily be dropped.
The reason for not trimming trailing whitespace at the end of markdown files is because two spaces at the end of a line is part of the markdown spec (meaning add a line break here). Official markdown doesn't treat a single line break any different to a single space when it comes to rendering. However, GitHub-flavored markdown, does treat single line break as an actual line break.
If you want to continue trimming trailing whitespace I'm ok with that but I'd recommend not doing so.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whitespace at the end of the line can be meaningful in Markdown, but I never use that line-break functionality in documentation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But the indent_style should definitely be tab 😅