Git Product home page Git Product logo

js.org-cleanup's People

Contributors

dependabot[bot] avatar mattipv4 avatar wdhdev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

js.org-cleanup's Issues

Validate: Don't report removals before additions

When iterating through the diff in the validate command, if we encounter an added part immediately after a removed part, we report this as an expected/found diff:

if (previousPart && previousPart.removed && j < previousPartLines.length) {
const previousPartLine = previousPartLines[j];
log(`Line ${line + 1}: Expected: '${partLine}'`, chalk.redBright);
log(`${' '.repeat(Math.log10(line + 1) + 7)} Found: '${previousPartLine}'`, chalk.redBright);

Due to this, when we encounter a removed part with the immediate next part being an added part, we should not report the removal. This bug can be seen in this run: https://github.com/js-org/js.org/runs/5720998192?check_suite_focus=true

README Doc

Whilst every method in the script has a correct JSDoc descriptor attached, this should really have an overall README which describes the three index.js flags and what they do, alongside covering the config JSON file.

Lock & close the cleanup issue

When the main pr process is called and the final pull request for the cleanup is created, the main cleanup issue should be locked to avoid any users commenting on this once the pull request has been made.

It may also be appropriate to post a comment in the issue informing maintainers that the cleanup is complete and no further changes need to be made to the issue as the pull request has been opened.

The pull request template should include a keyword to close the issue once merged. Eg Closes #xxx.

Script structure

This should be a minor thing to complete, but it would be much cleaner if the script files were all located within a subfolder such as src, with only index.js being located at the root of the project.

Cleanup: Support cleanup-ignore comment

Add support for entries having a // cleanup-ignore comment on them, which will allow them to skip the validation process for cleanup.

This will also involve a minor change to the validate logic for detecting/formatting the file, to allow // cleanup-ignore or // noCF cleanup-ignore.

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.