-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
702d725
commit c0733b9
Showing
7 changed files
with
6,967 additions
and
6,038 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,36 @@ | ||
name: ESLint | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
jobs: | ||
eslint: | ||
name: Run eslint scanning | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
security-events: write | ||
actions: read | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install ESLint | ||
run: | | ||
npm install eslint@latest | ||
npm install @microsoft/eslint-formatter-sarif@latest | ||
- name: Run ESLint | ||
env: | ||
SARIF_ESLINT_IGNORE_SUPPRESSED: "true" | ||
run: npx eslint . --format @microsoft/eslint-formatter-sarif --output-file eslint-results.sarif | ||
continue-on-error: true | ||
|
||
- name: Upload analysis results to GitHub | ||
uses: github/codeql-action/upload-sarif@v3 | ||
with: | ||
sarif_file: eslint-results.sarif | ||
wait-for-processing: true |
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,47 @@ | ||
const globals = require('globals'); | ||
const js = require('@eslint/js'); | ||
|
||
module.exports = [ | ||
js.configs.recommended, | ||
{ | ||
languageOptions: { | ||
globals: { | ||
...globals.browser, | ||
...globals.jest, | ||
}, | ||
parserOptions: { | ||
'ecmaVersion': 'latest' | ||
}, | ||
}, | ||
ignores: [ | ||
'build' | ||
], | ||
rules: { | ||
indent: [ | ||
'error', | ||
4 | ||
], | ||
'linebreak-style': [ | ||
'error', | ||
'windows' | ||
], | ||
quotes: [ | ||
'error', | ||
'single' | ||
], | ||
semi: [ | ||
'error', | ||
'always' | ||
], | ||
'no-undef': 'off', | ||
'no-unused-vars': 'off' | ||
} | ||
}, | ||
{ | ||
files: ['packed.js'], | ||
rules: { | ||
'no-unused-vars': 'error', | ||
'no-undef': 'error' | ||
} | ||
} | ||
]; |
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,34 +1,34 @@ | ||
import gulp from 'gulp'; | ||
import zip from 'gulp-zip'; | ||
import {deleteAsync, deleteSync} from 'del'; | ||
|
||
const FILES = [ | ||
'icons/**/*', | ||
'background.js', | ||
'index.js', | ||
'manifest.json', | ||
'packed.js', | ||
'popup.html', | ||
'popup.js', | ||
'popup.css', | ||
]; | ||
|
||
const BUILD_PATH = 'build'; | ||
const EXTENSION_FILENAME = 'whatsapp-web-plus' | ||
|
||
export function clean() { | ||
return deleteAsync(BUILD_PATH); | ||
} | ||
|
||
export function packed() { | ||
return gulp.src(FILES, { base: '.' }) | ||
.pipe(zip(EXTENSION_FILENAME + '.zip')) | ||
.pipe(gulp.dest(BUILD_PATH)); | ||
} | ||
|
||
export function unpacked() { | ||
return gulp.src(FILES, { base: '.' }) | ||
.pipe(gulp.dest(BUILD_PATH + '/' + EXTENSION_FILENAME)); | ||
} | ||
|
||
gulp.task('default', gulp.series(clean, unpacked, packed)); | ||
import gulp from 'gulp'; | ||
import zip from 'gulp-zip'; | ||
import {deleteAsync, deleteSync} from 'del'; | ||
|
||
const FILES = [ | ||
'icons/**/*', | ||
'background.js', | ||
'index.js', | ||
'manifest.json', | ||
'packed.js', | ||
'popup.html', | ||
'popup.js', | ||
'popup.css', | ||
]; | ||
|
||
const BUILD_PATH = 'build'; | ||
const EXTENSION_FILENAME = 'whatsapp-web-plus'; | ||
|
||
export function clean() { | ||
return deleteAsync(BUILD_PATH); | ||
} | ||
|
||
export function packed() { | ||
return gulp.src(FILES, { base: '.' }) | ||
.pipe(zip(EXTENSION_FILENAME + '.zip')) | ||
.pipe(gulp.dest(BUILD_PATH)); | ||
} | ||
|
||
export function unpacked() { | ||
return gulp.src(FILES, { base: '.' }) | ||
.pipe(gulp.dest(BUILD_PATH + '/' + EXTENSION_FILENAME)); | ||
} | ||
|
||
gulp.task('default', gulp.series(clean, unpacked, packed)); |
Oops, something went wrong.