forked from codex-team/editor.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Improvements] ESLint action (codex-team#1099)
* TSLint -> ESLint, GitHub Action * Update eslint.yml * Autofix * more autofix * fix * manually fix some issues * Update CHANGELOG.md
- Loading branch information
Showing
64 changed files
with
1,694 additions
and
982 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
node_modules | ||
*.d.ts | ||
src/components/tools/paragraph | ||
src/polyfills.ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,92 +1,18 @@ | ||
{ | ||
/** Enable ES6 features */ | ||
"parserOptions": { | ||
"ecmaVersion": 2017, | ||
"sourceType": "module" | ||
}, | ||
"rules": { | ||
|
||
"arrow-spacing": [2, { | ||
"before": true, | ||
"after": true | ||
}], | ||
|
||
/** Variables */ | ||
"no-catch-shadow": 2, | ||
"no-delete-var": 2, | ||
"no-label-var": 2, | ||
"no-shadow-restricted-names": 2, | ||
"no-shadow": 2, | ||
"no-undef-init": 2, | ||
"no-undef": 2, | ||
"no-unused-vars": 0, | ||
|
||
/** Style */ | ||
"array-bracket-spacing": [2, "never", { | ||
"singleValue": true, | ||
"objectsInArrays": true, | ||
"arraysInArrays": true | ||
}], | ||
"quotes": [2, "single", { | ||
"avoidEscape": true, | ||
"allowTemplateLiterals": true | ||
}], | ||
"eqeqeq": 0, | ||
"brace-style": [2, "1tbs"], | ||
"comma-spacing": [2, { | ||
"before": false, | ||
"after": true | ||
}], | ||
"comma-style": [2, "last"], | ||
"eol-last": 0, | ||
"no-nested-ternary": 1, | ||
"no-trailing-spaces": 2, | ||
"no-mixed-spaces-and-tabs": 2, | ||
"padded-blocks": [2, "never"], | ||
"space-before-blocks": 1, | ||
"space-before-function-paren": [1, { | ||
"anonymous": "always", | ||
"named": "never" | ||
}], | ||
"spaced-comment": [2, "always", { | ||
"exceptions": ["-", "+"], | ||
"markers": ["=", "!"] | ||
}], | ||
"semi": [2, "always"], | ||
"indent": [2, 2, { | ||
"SwitchCase": 1 | ||
}], | ||
"camelcase": [2, { | ||
"properties": "always" | ||
}], | ||
"newline-after-var": [1, "always"] | ||
|
||
}, | ||
"globals":{ | ||
"document": true, | ||
"module": true, | ||
"require": true, | ||
"window": true, | ||
"console" : true, | ||
"codex": true, | ||
"VERSION" : true, | ||
"Promise" : true, | ||
"MutationObserver": true, | ||
"FormData": true, | ||
"XMLHttpRequest": true, | ||
"ActiveXObject": true, | ||
"RegExp": true, | ||
"Module": true, | ||
"Node": true, | ||
"Element": true, | ||
"DocumentFragment": true, | ||
"Proxy": true, | ||
"Symbol": true, | ||
"$": true, | ||
"_": true, | ||
"setTimeout": true, | ||
"process": true, | ||
"__dirname": true, | ||
"Map": true | ||
} | ||
"extends": [ | ||
"codex" | ||
], | ||
"rules": { | ||
/** | ||
* Temporary suppress some errors. We need to fix them partially in next patches | ||
*/ | ||
"@typescript-eslint/explicit-function-return-type": ["warn"], | ||
"@typescript-eslint/explicit-member-accessibility": ["warn"], | ||
"@typescript-eslint/member-ordering": ["warn"], | ||
"@typescript-eslint/no-empty-function": ["warn"], | ||
"no-prototype-builtins": ["warn"], | ||
"no-mixed-operators": ["warn"], | ||
"import/no-duplicates": ["warn"], | ||
"no-case-declarations": ["warn"] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: ESLint CodeX | ||
|
||
on: [pull_request] | ||
|
||
jobs: | ||
lint: | ||
name: ESlint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Cache node modules | ||
uses: actions/cache@v1 | ||
with: | ||
path: node_modules | ||
key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.OS }}-build-${{ env.cache-name }}- | ||
${{ runner.OS }}-build- | ||
${{ runner.OS }}- | ||
- run: yarn install | ||
|
||
- run: yarn lint |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,6 +25,7 @@ | |
* Editor.js | ||
* | ||
* Short Description (눈_눈;) | ||
* | ||
* @version 2.0 | ||
* | ||
* @licence Apache-2.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.