Giter VIP home page Giter VIP logo

Comments (6)

misterjoonas avatar misterjoonas commented on July 27, 2024

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.

hkirsman avatar hkirsman commented on July 27, 2024

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?

@deiviic @misterjoonas

from code-quality.

deiviic avatar deiviic commented on July 27, 2024

@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.

hkirsman avatar hkirsman commented on July 27, 2024

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.

deiviic avatar deiviic commented on July 27, 2024

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.

hkirsman avatar hkirsman commented on July 27, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.