Comments (6)
Is phpcs supposed to check JS files? The validation errors are all about:
TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true" (Generic.PHP.UpperCaseConstant.Found)
but lowercase is used for boolean values in JS.
from code-quality.
Indeed, and TRUE is not even proper javascript. So this means we don't want to add js as default extension.
What I don't understand is how during deploy js files are scanned? Was it just a glitch?
from code-quality.
@hkirsman Yes, it seems I missed the config when I initially investigated this but it's been fixed. I'm not sure why this issue didn't show up locally when running GrumPHP but only when running PHPCS separately.
https://github.com/wunderio/client-fi-lab-elab/commit/4e9a635adbd67c70a5918e946d1f356e9e95aeaf
from code-quality.
Maybe you didn't use GrumpPHP and bypassed some of our default configs? With GrumPHP one can run specific task like this:
./vendor/bin/grumphp run --tasks=phpcs
from code-quality.
I just ran
lando grumphp run
and then found the issue when running phpcs independently of GrumPHP. Perhaps in that case some configs were bypassed but I remember using the phpcs.xml
as the standard and it's also used in GrumPHP. In any case, the JS file exclusion was missing from the phpcs.xml
file and now it's fixed. 🙂
from code-quality.
Ok, thanks.
I'll close this and create something new instead - adding ESLint to lint Drupal js with Drupal rules #84
from code-quality.
Related Issues (20)
- Shout out new 3.x version in Wunder Slack
- Flag all files during deploy for code complexity?
- Fix "PHP Warning: preg_match(): Unknown modifier 'c'"
- Change yaml and json task default paths
- PHP Fatal error: Trait 'Symfony\Bridge\PhpUnit\Legacy\PolyfillAssertTrait' not found
- PhpCompatibility ignore_patterns HOT 1
- Best way to avoid error with $_POST array using array_map HOT 1
- Add info to readme how to run task specific tasks
- Change the default PHP code checker version to 8.0
- Change PHP refererence in readme and in php_compatibility task to 8.1
- Add ESLint support and configure it to use Drupal standards
- Adjust coding standards so that it would be possible to run phpcs with Lando + PhpStorm HOT 2
- Drupal ^9.5 Uncaught error: Cannot unset string offsets
- Fix Psalm HOT 1
- Version 2.2.2 is not compatible with Drupal 10 due to symfony/finder version HOT 1
- Drupal 10 (drupal/core-dev) requires phpstan/extension-installer which breaks php_stan HOT 3
- Psalm fixes HOT 1
- Add git_commit_message.skip_on_merge_commit: true
- Main branch checks are failing
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from code-quality.