Skip to content
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

NEWLINE: added eol for different environments and updated dependencies #30

Draft
wants to merge 19 commits into
base: main
Choose a base branch
from
Draft
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
163 changes: 117 additions & 46 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,58 +1,129 @@
{
"env": {
"browser": true,
"commonjs": true,
"es2021": true,
"node": true
"browser": true,
"es2021": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended"
"eslint:recommended",
"plugin:@typescript-eslint/recommended"
],
"ignorePatterns": [
"*.js"
],
"overrides": [],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest"
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": [
"@typescript-eslint"
"@typescript-eslint"
],
"rules": {
"@typescript-eslint/no-explicit-any": [
"off"
],
"@typescript-eslint/no-var-requires": [
"off"
],
"@typescript-eslint/no-inferrable-types": [
"off"
],
"indent": [
"off",
"tab"
],
"linebreak-style": [
"warn",
"unix"
],
"no-mixed-spaces-and-tabs": [
"warn",
"smart-tabs"
],
"quotes": [
"warn",
"single",
{
"allowTemplateLiterals": true
}
],
"semi": [
"warn",
"always"
],
"comma-dangle": [
"warn",
"always-multiline"
]
"@typescript-eslint/lines-between-class-members": [
"error",
{
"exceptAfterOverload": true
}
],
"@typescript-eslint/no-explicit-any": [
"off"
],
"@typescript-eslint/no-inferrable-types": [
"off"
],
"prefer-const": [
"warn"
],
"lines-between-class-members": [
"off"
],
"space-in-parens": [
"error",
"never"
],
"padding-line-between-statements": [
"warn",
{
"blankLine": "always",
"prev": "*",
"next": "*"
},
{
"blankLine": "always",
"prev": "import",
"next": "*"
},
{
"blankLine": "never",
"prev": "import",
"next": "import"
},
{
"blankLine": "any",
"prev": [
"const",
"let",
"var"
],
"next": [
"const",
"let",
"var"
]
},
{
"blankLine": "any",
"prev": [
"expression"
],
"next": [
"expression"
]
},
{
"blankLine": "any",
"prev": [
"case",
"default"
],
"next": [
"case",
"default"
]
}
],
"indent": [
"off",
4
],
"linebreak-style": [
"warn",
"unix"
],
"keyword-spacing": [
"warn",
{
"before": true
}
],
"no-mixed-spaces-and-tabs": [
"warn",
"smart-tabs"
],
"quotes": [
"warn",
"single",
{
"allowTemplateLiterals": true
}
],
"semi": [
"warn",
"always"
],
"comma-dangle": [
"warn",
"always-multiline"
]
}
}
}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -12,6 +12,7 @@ ui
*.so
*.min.js
*.d.ts.map
*.d.ts
dist
# Packages #
############
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# CHANGELOG
#### 1.6.0
- updated dependencies
- fixed "deprecated" text

#### 1.5.0
- Using latest typescript version, please check if your environment still works with this version before upgrading!
21 changes: 21 additions & 0 deletions environment.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@

let newLine = '\r\n';

function isNode() {
try {
return this === global;
}
catch {
return false;
}
}

if (isNode()) {
const isWindows = typeof process != 'undefined' && 'win32' === process.platform;

if (!isWindows) {
newLine = '\n';
}
}

export { newLine };
69 changes: 0 additions & 69 deletions index.d.ts

This file was deleted.

Loading