textToHTML_V2
ESLint
textToHTML_V2 | ESLint | |
---|---|---|
14 | 382 | |
0 | 24,374 | |
- | 1.3% | |
0.0 | 9.7 | |
over 2 years ago | 1 day ago | |
JavaScript | JavaScript | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
textToHTML_V2
-
Publishing my first npm package
As mentioned, I published a package as part of the course and the way to install it is via terminal. My tool is called textToHTML. You may type npx texttohtmlv2 in your command line. It will prompt you to install the package (say yes). Then, to see if it's working you can try the help command by typing npx texttohtmlv2 -h in the terminal. It should display a list of other things to try out.
-
GitHub continuous integration basics (my experience).
Last week in class we added automated testing to our Static Site Generators (mine is called textToHTML). This included some tests for Jest which make sure the core functionality of our programs work as expected.
-
Lab 9 - GitHub Actions Workflow
I pick Andre repo, I created an issue stating, to separate generate HTML into a function, then add test case for that function. After finishing my fix. I created a PR, I see that the workflow Andre setup is working correctly.
-
Jest: execution testing & automated setup.
Jest is a testing framework used for writing unit tests for your application. It allows you to write tests and test suite files ending in .test.js or .spec.js. In these files, you are able to test individual pieces of your application. For example, in my textToHTML SSG I have a function that processes Markdown syntax, called... processMarkdown()... I know, super creative.
-
Linting: Oxyclean for your code.
Having set up linting/formatting in my own SSG called textToHTML, commit link, I was curious what it would find.
-
DocuSaurus Adventures and SSG Inspiration
I saw how DocuSaurus handled the Markdown features, and also accessibility on their HTML templates. As such I decided for my own SSG to improve the Markdown capabilities and also add tags to each of the generated pages.
Given that we were now allowed to use an open source library to implement these features instead of coding from scratch, I chose Markdown-it.
Down to brass tacks
Implementing the changes were fairly simple, as in my original method I used a function to take the content (excluding head, meta tags, body) and process the Markdown using regexp. Instead what I did now was pass my content to the markdown function which then calls the "md.render()" method and returns that content.
var md = require('markdown-it')({ html: true, linkify: true, typographer: true }); const processMarkdown = (data) => { return md.render(data); };
Enter fullscreen mode Exit fullscreen mode -
Code Custodian: A lesson in refactoring.
In terms of the Yargs code, I made a module and required it in my main file in order to get access to "argv" value. This helped me make my main textToHTML.js file much cleaner because the setup code for Yargs was put into it's own file and textToHTML.js just handles the file logic.
-
Open Source: git remotes and merges
Links: My partner's SSG, Issue-14, Pull Request
-
My repo has branches...and their branches have branches.
This week in OSD600 we went back to contributing to our own Static Site Generators. We had to pick 2 additional features to implement. For my repository textToHTML_V2 I decided to pick:
-
My first experience with Pull Requests and merging.
Some of the pull requests on my own repository include one where my partner had to fix the name of the HTML file generated from .md inputs. Pull Request 11 . That was really the only thing I needed my partner to change because we both asked about the code we were writing along the way so the pull request merge was smooth.
ESLint
-
How to make ESLint and Prettier work together? 🛠️
Let's be honest - setting up tools for a new project can be a frustrating process. Especially when you want to jump straight to coding part. This is often the case with ESLint and Prettier, two popular tools in the JavaScript ecosystem that can sometimes interfere with each other when it comes to code formatting. Fortunately, there's a simple solution to this process, and it's called eslint-plugin-prettier.
-
Release Radar · April 2024 Edition: Major updates from the open source community
Do you have the need to find and fix problems in your JavaScript? Then ESLint is for you. With over 120 million downloads each month, it's definitely one of the most popular projects out there. The latest version introduces a new configuration system, designed to simplify available configuration options. Old and deprecated rules have been removed, and a new configuration inspector has been added. Check out the blog for all the highlights, and a migration guide.
-
Shared Data-Layer Setup For Micro Frontend Application with Nx Workspace
ESLint: A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript.
-
To Review or Not to Review: The Debate on Mandatory Code Reviews
Automating code checks with static code analysis allows us to enforce code styling effectively. By integrating tools into our workflow, we can identify errors at an early stage, while coding instead of blocking us at the end. For instance, flake8 checks Python code for style and errors, eslint performs similar checks for JavaScript, and prettier automatically formats code to maintain consistency.
-
Biome.js : Prettier+ESLint killer ?
If you're a developer, you're surely familiar with Prettier and ESLint. With over 8 years of existence, they have established themselves as references in the JavaScript ecosystem.
-
Most basic code formatting
eslint is used to avoid code errors
-
How to use Lefthooks in your node project?
No lint errors: The committed code does not contain any lint errors (eslint).
-
Git Project Configuration With Husky and ESLint
Let’s walk through the steps for a one-time setup to configure husky pre-commit and pre-push hooks, ESLint with code styles conventions, prettier code formatter, and lint-staged. Husky automatically runs a script on each commit or push. This is useful for linting files to enforce code styles that keeps the entire code base following conventions.
-
What is an Abstract Syntax Tree in Programming?
GitHub | Website
-
Shared Tailwind Setup For Micro Frontend Application with Nx Workspace
ESLint: A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript.
What are some alternatives?
GMOT-SSG - My Static Site Generator!
XO - ❤️ JavaScript/TypeScript linter (ESLint wrapper) with great defaults
text-ssg - Release 0.1.0
Standard - 🌟 JavaScript Style Guide, with linter & automatic code fixer
prettier - Prettier is an opinionated code formatter.
JSHint - JSHint is a tool that helps to detect errors and potential problems in your JavaScript code
JSLint - JSLint, The JavaScript Code Quality and Coverage Tool
Babel (Formerly 6to5) - 🐠 Babel is a compiler for writing next generation JavaScript.
jsinspect - Detect copy-pasted and structurally similar code
nvim-lint - An asynchronous linter plugin for Neovim complementary to the built-in Language Server Protocol support.
next-seo - Next SEO is a plug in that makes managing your SEO easier in Next.js projects.
dotenv-linter - ⚡️Lightning-fast linter for .env files. Written in Rust 🦀