Skip to content

Commit

Permalink
chore: fix text files using CRLF line endings to use LF (SAP#12325)
Browse files Browse the repository at this point in the history
- fix text files using CRLF line endings to use LF
- avoid treating binary files as text ones so to avoid unnecessary changing their line endings, which was the case for me after cloning a fresh repo (or running `git add --renormalize .` in existing repo):

```
        modified:   docs/SAP Corporate Contributor License Agreement.pdf
        modified:   docs/assets/spartacus-blue.png
        modified:   projects/storefrontapp/src/assets/icons/icon-128x128.png`
        modified:   projects/storefrontapp/src/assets/icons/icon-144x144.png
        modified:   projects/storefrontapp/src/assets/icons/icon-152x152.png
        modified:   projects/storefrontapp/src/assets/icons/icon-192x192.png
        modified:   projects/storefrontapp/src/assets/icons/icon-384x384.png
        modified:   projects/storefrontapp/src/assets/icons/icon-512x512.png
        modified:   projects/storefrontapp/src/assets/icons/icon-72x72.png
        modified:   projects/storefrontapp/src/assets/icons/icon-96x96.png
        modified:   projects/storefrontapp/src/assets/splash/ipad_splash.png
        modified:   projects/storefrontapp/src/assets/splash/ipadpro1_splash.png
        modified:   projects/storefrontapp/src/assets/splash/ipadpro2_splash.png
        modified:   projects/storefrontapp/src/assets/splash/ipadpro3_splash.png
        modified:   projects/storefrontapp/src/assets/splash/iphone5_splash.png
        modified:   projects/storefrontapp/src/assets/splash/iphone6_splash.png
        modified:   projects/storefrontapp/src/assets/splash/iphoneplus_splash.png
        modified:   projects/storefrontapp/src/assets/splash/iphonex_splash.png
        modified:   projects/storefrontapp/src/assets/splash/iphonexr_splash.png
        modified:   projects/storefrontapp/src/assets/splash/iphonexsmax_splash.png
```

### Consequences for developers
When it's merged to develop, those 4 files will use LF line endings:
```
   .github/api-extractor-action/tsconfig.json
   .github/cache-builded-libs/tsconfig.json
   .github/cache-builded-libs/yarn.lock
   NOTICE.txt
```
Then when someone switches locally from develop to any other old side branch (i.e. old feature or release branch), he/she will get annoying git dirty status in his/her branch for those 4 files. There are 2 options I know how fix it:
a) merge develop to your branch (good for feature branches; no-go for old release branches):
   ```
   git add --renormalize .
   git merge develop
   git add --renormalize .
   ```
b) or commit those 4 files in your branch
  • Loading branch information
Platonn authored May 6, 2021
1 parent 56c52dd commit be597c2
Show file tree
Hide file tree
Showing 5 changed files with 595 additions and 595 deletions.
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* text eol=lf
* text=auto eol=lf
58 changes: 29 additions & 29 deletions .github/api-extractor-action/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
{
"compilerOptions": {
/* Basic Options */
"target": "es2019", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
"lib": ["es2019", "esnext.bigint", "es2020.string", "es2020.symbol.wellknown"], /* Specify library files to be included in the compilation. */
"allowJs": false, /* Allow javascript files to be compiled. */
"checkJs": false, /* Report errors in .js files. */
"declaration": false, /* Generates corresponding '.d.ts' file. */
"declarationMap": false, /* Generates a sourcemap for each corresponding '.d.ts' file. */
"sourceMap": false, /* Generates corresponding '.map' file. */

/* Strict Type-Checking Options */
"strict": true, /* Enable all strict type-checking options. */

/* Additional Checks */
"noUnusedLocals": true, /* Report errors on unused locals. */
"noUnusedParameters": true, /* Report errors on unused parameters. */
"noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
"noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */

/* Module Resolution Options */
"moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
"esModuleInterop": false, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */

/* Advanced Options */
"forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */
}
}
{
"compilerOptions": {
/* Basic Options */
"target": "es2019", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
"lib": ["es2019", "esnext.bigint", "es2020.string", "es2020.symbol.wellknown"], /* Specify library files to be included in the compilation. */
"allowJs": false, /* Allow javascript files to be compiled. */
"checkJs": false, /* Report errors in .js files. */
"declaration": false, /* Generates corresponding '.d.ts' file. */
"declarationMap": false, /* Generates a sourcemap for each corresponding '.d.ts' file. */
"sourceMap": false, /* Generates corresponding '.map' file. */

/* Strict Type-Checking Options */
"strict": true, /* Enable all strict type-checking options. */

/* Additional Checks */
"noUnusedLocals": true, /* Report errors on unused locals. */
"noUnusedParameters": true, /* Report errors on unused parameters. */
"noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
"noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */

/* Module Resolution Options */
"moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
"esModuleInterop": false, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */

/* Advanced Options */
"forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */
}
}
58 changes: 29 additions & 29 deletions .github/cache-builded-libs/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
{
"compilerOptions": {
/* Basic Options */
"target": "es2019", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
"lib": ["es2019", "esnext.bigint", "es2020.string", "es2020.symbol.wellknown"], /* Specify library files to be included in the compilation. */
"allowJs": false, /* Allow javascript files to be compiled. */
"checkJs": false, /* Report errors in .js files. */
"declaration": false, /* Generates corresponding '.d.ts' file. */
"declarationMap": false, /* Generates a sourcemap for each corresponding '.d.ts' file. */
"sourceMap": false, /* Generates corresponding '.map' file. */

/* Strict Type-Checking Options */
"strict": true, /* Enable all strict type-checking options. */

/* Additional Checks */
"noUnusedLocals": true, /* Report errors on unused locals. */
"noUnusedParameters": true, /* Report errors on unused parameters. */
"noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
"noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */

/* Module Resolution Options */
"moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
"esModuleInterop": false, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */

/* Advanced Options */
"forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */
}
}
{
"compilerOptions": {
/* Basic Options */
"target": "es2019", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
"lib": ["es2019", "esnext.bigint", "es2020.string", "es2020.symbol.wellknown"], /* Specify library files to be included in the compilation. */
"allowJs": false, /* Allow javascript files to be compiled. */
"checkJs": false, /* Report errors in .js files. */
"declaration": false, /* Generates corresponding '.d.ts' file. */
"declarationMap": false, /* Generates a sourcemap for each corresponding '.d.ts' file. */
"sourceMap": false, /* Generates corresponding '.map' file. */

/* Strict Type-Checking Options */
"strict": true, /* Enable all strict type-checking options. */

/* Additional Checks */
"noUnusedLocals": true, /* Report errors on unused locals. */
"noUnusedParameters": true, /* Report errors on unused parameters. */
"noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
"noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */

/* Module Resolution Options */
"moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
"esModuleInterop": false, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */

/* Advanced Options */
"forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */
}
}
Loading

0 comments on commit be597c2

Please sign in to comment.