1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-08-01 17:38:38 +00:00

Use ESLint directly

This commit is contained in:
Yassine Guedidi 2025-02-15 00:02:23 +01:00
parent 8e0b9d4d94
commit da0404f2b5
5 changed files with 19 additions and 2 deletions

View file

@ -55,3 +55,5 @@ To run the tests locally run `make test`.
To run the PHP formatter run `make fix-cs`. To run the PHP formatter run `make fix-cs`.
To run the PHPStan static analysis run `make phpstan`. To run the PHPStan static analysis run `make phpstan`.
To run the JS linter run `make lint-js`.

View file

@ -30,6 +30,12 @@ jobs:
env: env:
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: "Install Node"
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: 'yarn'
- name: "Setup MySQL" - name: "Setup MySQL"
run: | run: |
sudo systemctl start mysql.service sudo systemctl start mysql.service
@ -41,6 +47,9 @@ jobs:
with: with:
composer-options: "--optimize-autoloader --prefer-dist" composer-options: "--optimize-autoloader --prefer-dist"
- name: "Install dependencies with Yarn"
run: yarn install
- name: "Run Composer validate" - name: "Run Composer validate"
run: "composer validate" run: "composer validate"
@ -61,3 +70,6 @@ jobs:
- name: "Run ergebnis/composer-normalize" - name: "Run ergebnis/composer-normalize"
run: "composer normalize --dry-run --no-check-lock" run: "composer normalize --dry-run --no-check-lock"
- name: "Run ESLint"
run: "yarn lint:js"

View file

@ -52,6 +52,9 @@ fix-cs: ## Run PHP-CS-Fixer
phpstan: ## Run PHPStan phpstan: ## Run PHPStan
@$(PHP_NO_XDEBUG) bin/phpstan analyse @$(PHP_NO_XDEBUG) bin/phpstan analyse
lint-js: ## Run ESLint
@$(YARN) lint:js
release: ## Create a package. Need a VERSION parameter (eg: `make release VERSION=master`). release: ## Create a package. Need a VERSION parameter (eg: `make release VERSION=master`).
ifndef VERSION ifndef VERSION
$(error VERSION is not set) $(error VERSION is not set)

View file

@ -102,6 +102,7 @@
"dev-server": "encore dev-server", "dev-server": "encore dev-server",
"build:dev": "encore dev", "build:dev": "encore dev",
"watch": "encore dev --watch", "watch": "encore dev --watch",
"build:prod": "encore production --progress" "build:prod": "encore production --progress",
"lint:js": "eslint assets/*.js assets/js/*.js assets/js/**/*.js"
} }
} }

View file

@ -24,7 +24,6 @@ Encore
.enableSassLoader() .enableSassLoader()
.enablePostCssLoader() .enablePostCssLoader()
.autoProvidejQuery() .autoProvidejQuery()
.enableEslintPlugin()
.addPlugin(new StyleLintPlugin({ .addPlugin(new StyleLintPlugin({
configFile: 'stylelint.config.js', configFile: 'stylelint.config.js',
failOnError: false, failOnError: false,