-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #623 from Galooshi/eslint
- Loading branch information
Showing
31 changed files
with
523 additions
and
912 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
This file was deleted.
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: ESLint | ||
|
||
on: [push] | ||
|
||
jobs: | ||
eslint: | ||
name: ESLint | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20 | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Run ESLint | ||
run: npm run eslint |
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,23 @@ | ||
import globals from 'globals'; | ||
import pluginJs from '@eslint/js'; | ||
|
||
export default [ | ||
{ | ||
ignores: ['build/**', 'coverage/**'], | ||
}, | ||
|
||
{ | ||
languageOptions: { | ||
globals: globals.node, | ||
}, | ||
}, | ||
|
||
pluginJs.configs.recommended, | ||
|
||
{ | ||
files: ['**/__mocks__/**', '**/__tests__/**'], | ||
languageOptions: { | ||
globals: globals.jest, | ||
}, | ||
}, | ||
]; |
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,27 +1,27 @@ | ||
// @flow | ||
// | ||
export default class CommandLineEditor { | ||
_lines: Array<string>; | ||
_lines; | ||
|
||
constructor(lines: Array<string>) { | ||
constructor(lines) { | ||
this._lines = lines; | ||
} | ||
|
||
currentFileContent(): string { | ||
currentFileContent() { | ||
return this._lines.join('\n'); | ||
} | ||
|
||
get(index: number): string { | ||
get(index) { | ||
return this._lines[index]; | ||
} | ||
|
||
remove(index: number) { | ||
remove(index) { | ||
this._lines.splice(index, 1); | ||
} | ||
|
||
/** | ||
* Insert a line above the specified index | ||
*/ | ||
insertBefore(index: number, str: string) { | ||
insertBefore(index, str) { | ||
this._lines.splice(index, 0, str); | ||
} | ||
} |
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.