mirror of
https://github.com/wallabag/wallabag.git
synced 2025-02-28 16:36:26 +00:00
Merge pull request #8002 from wallabag/remove-linters-from-build-process
Remove linters from build process
This commit is contained in:
commit
d66c3ef75e
7 changed files with 278 additions and 588 deletions
4
.github/CONTRIBUTING.md
vendored
4
.github/CONTRIBUTING.md
vendored
|
@ -55,3 +55,7 @@ To run the tests locally run `make test`.
|
|||
To run the PHP formatter run `make fix-cs`.
|
||||
|
||||
To run the PHPStan static analysis run `make phpstan`.
|
||||
|
||||
To run the JS linter run `make lint-js`.
|
||||
|
||||
To run the SCSS linter run `make lint-scss`.
|
||||
|
|
27
.github/workflows/coding-standards.yml
vendored
27
.github/workflows/coding-standards.yml
vendored
|
@ -30,6 +30,12 @@ jobs:
|
|||
env:
|
||||
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: "Install Node"
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version-file: ".nvmrc"
|
||||
cache: 'yarn'
|
||||
|
||||
- name: "Setup MySQL"
|
||||
run: |
|
||||
sudo systemctl start mysql.service
|
||||
|
@ -37,27 +43,48 @@ jobs:
|
|||
cp app/config/tests/parameters_test.mysql.yml app/config/parameters_test.yml
|
||||
|
||||
- name: "Install dependencies with Composer"
|
||||
id: composer-install
|
||||
uses: "ramsey/composer-install@v3"
|
||||
with:
|
||||
composer-options: "--optimize-autoloader --prefer-dist"
|
||||
|
||||
- name: "Install dependencies with Yarn"
|
||||
id: yarn-install
|
||||
run: yarn install
|
||||
|
||||
- name: "Run Composer validate"
|
||||
if: always() && steps.composer-install.outcome == 'success'
|
||||
run: "composer validate"
|
||||
|
||||
- name: "Run Composer dependency analyser"
|
||||
if: always() && steps.composer-install.outcome == 'success'
|
||||
run: "bin/composer-dependency-analyser"
|
||||
|
||||
- name: "Run PHP CS Fixer"
|
||||
if: always() && steps.composer-install.outcome == 'success'
|
||||
run: "bin/php-cs-fixer fix --verbose --dry-run --format=checkstyle | cs2pr"
|
||||
|
||||
- name: "Generate test cache for PHPStan"
|
||||
id: test-cache
|
||||
if: always() && steps.composer-install.outcome == 'success'
|
||||
run: "php bin/console cache:clear --env=test"
|
||||
|
||||
- name: "Run PHPStan"
|
||||
if: always() && steps.test-cache.outcome == 'success'
|
||||
run: "php bin/phpstan analyse --no-progress --error-format=checkstyle | cs2pr"
|
||||
|
||||
- name: "Run TwigCS"
|
||||
if: always() && steps.composer-install.outcome == 'success'
|
||||
run: "php bin/twigcs --severity=error --display=blocking --reporter checkstyle app/ src/ | cs2pr"
|
||||
|
||||
- name: "Run ergebnis/composer-normalize"
|
||||
if: always() && steps.composer-install.outcome == 'success'
|
||||
run: "composer normalize --dry-run --no-check-lock"
|
||||
|
||||
- name: "Run ESLint"
|
||||
if: always() && steps.yarn-install.outcome == 'success'
|
||||
run: "yarn lint:js"
|
||||
|
||||
- name: "Run Stylelint"
|
||||
if: always() && steps.yarn-install.outcome == 'success'
|
||||
run: "yarn lint:scss"
|
||||
|
|
|
@ -52,6 +52,12 @@ fix-cs: ## Run PHP-CS-Fixer
|
|||
phpstan: ## Run PHPStan
|
||||
@$(PHP_NO_XDEBUG) bin/phpstan analyse
|
||||
|
||||
lint-js: ## Run ESLint
|
||||
@$(YARN) lint:js
|
||||
|
||||
lint-scss: ## Run Stylelint
|
||||
@$(YARN) lint:scss
|
||||
|
||||
release: ## Create a package. Need a VERSION parameter (eg: `make release VERSION=master`).
|
||||
ifndef VERSION
|
||||
$(error VERSION is not set)
|
||||
|
|
|
@ -12,8 +12,7 @@ RUN apt-get update \
|
|||
openssl \
|
||||
software-properties-common
|
||||
|
||||
RUN curl 'https://deb.nodesource.com/gpgkey/nodesource.gpg.key' | apt-key add - \
|
||||
&& echo "deb https://deb.nodesource.com/node_${NODE_VERSION}.x $(lsb_release -cs) main" > /etc/apt/sources.list.d/nodesource.list
|
||||
RUN curl -fsSL https://deb.nodesource.com/setup_${NODE_VERSION}.x | bash -
|
||||
|
||||
RUN apt-get update && apt-get install -y \
|
||||
libmcrypt-dev \
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
"@babel/core": "^7.26.9",
|
||||
"@babel/eslint-parser": "^7.26.8",
|
||||
"@babel/preset-env": "^7.26.9",
|
||||
"@symfony/webpack-encore": "^4.7.0",
|
||||
"@symfony/webpack-encore": "^5.0.1",
|
||||
"autoprefixer": "^10.4.20",
|
||||
"babel-loader": "^9.2.1",
|
||||
"core-js": "^3.23.0",
|
||||
|
@ -67,7 +67,6 @@
|
|||
"stylelint-config-standard": "^34.0.0",
|
||||
"stylelint-config-standard-scss": "^11.1.0",
|
||||
"stylelint-scss": "^5.3.2",
|
||||
"stylelint-webpack-plugin": "^5.0.1",
|
||||
"terser-webpack-plugin": "^5.3.11",
|
||||
"url-loader": "^4.1.1",
|
||||
"webpack": "^5.98.0",
|
||||
|
@ -102,6 +101,8 @@
|
|||
"dev-server": "encore dev-server",
|
||||
"build:dev": "encore dev",
|
||||
"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",
|
||||
"lint:scss": "stylelint assets/scss/*.scss assets/scss/**/*.scss"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
const Encore = require('@symfony/webpack-encore');
|
||||
const StyleLintPlugin = require('stylelint-webpack-plugin');
|
||||
|
||||
if (!Encore.isRuntimeEnvironmentConfigured()) {
|
||||
Encore.configureRuntimeEnvironment(process.env.NODE_ENV || 'dev');
|
||||
|
@ -23,14 +22,6 @@ Encore
|
|||
})
|
||||
.enableSassLoader()
|
||||
.enablePostCssLoader()
|
||||
.autoProvidejQuery()
|
||||
.enableEslintPlugin()
|
||||
.addPlugin(new StyleLintPlugin({
|
||||
configFile: 'stylelint.config.js',
|
||||
failOnError: false,
|
||||
quiet: false,
|
||||
context: 'assets',
|
||||
files: '**/*.scss',
|
||||
}));
|
||||
.autoProvidejQuery();
|
||||
|
||||
module.exports = Encore.getWebpackConfig();
|
||||
|
|
Loading…
Reference in a new issue