Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

⚙️ Add linting and CI infrastructure #85

Merged
merged 4 commits into from Mar 5, 2020

Conversation

greatislander
Copy link
Contributor

@greatislander greatislander commented Feb 19, 2020

This PR runs lint and test commands in a pre-commit hook when JS files are staged (using husky and lint-staged), and adds a GitHub Actions workflow which runs lint and test commands. This is a starting point for addressing #74, and could be merged as-is or once other pieces of the linting/testing infrastructure are in place and ready to be integrated (e.g. Stylelint).

One thing that I didn't do that might be worth considering was set the lint command to run with --fix to automatically address any issues that eslint + Prettier can resolve on their own. This could be "a way to apply the formatting configured through the tools above for contributors who are not able to set up an advanced dev workflow on their machines" as per @tatianamac in #74 (comment). Let me know if you think that would be a good next step.

GitHub Actions results on my fork: https://github.com/greatislander/selfdefined/runs/455516486?check_suite_focus=true

@tatianamac tatianamac linked an issue Feb 26, 2020 that may be closed by this pull request
Copy link
Collaborator

@ovlb ovlb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for keeping you waiting! I would love to have the --fix flag added. Everything looks good!

@tatianamac
Copy link
Collaborator

LGTM!

@greatislander greatislander requested a review from ovlb March 5, 2020 03:45
@greatislander
Copy link
Contributor Author

I've added the --fix flag to the eslint hook.

Copy link
Collaborator

@ovlb ovlb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @greatislander 💞

@tatianamac tatianamac merged commit ca07ab3 into selfdefined:master Mar 5, 2020
@greatislander greatislander deleted the add/linting-and-ci branch March 5, 2020 18:18
@tatianamac
Copy link
Collaborator

Thank you so much, @greatislander! 🎉

@greatislander
Copy link
Contributor Author

My pleasure!

@greatislander
Copy link
Contributor Author

I'm going to update #92 with these changes, so it will include auto-fix on commit.

tatianamac added a commit that referenced this pull request Mar 11, 2020
* Add a Sass function to convert pixels to rems (resolve #67)

* chore(packages): eleventy@0.10.0

* Rename function, replace pixel usage with rem conversions

* typo gaslighting

* Move pxToRem to functions partial

* feat(eslint): install eslint && prettier config

* chore: move findExistingDefinition into own file

* chore: set up ava

# Conflicts:
#	package-lock.json
#	package.json

* feat(filters): move permalink function into file, add test

# Conflicts:
#	.eleventy.js

* feat(permalink): revert cherry-picked changes to structure

* chore: update package-lock with ava

* config(eslint): specify source type

* Issue #51: Updated definition of polyamory.

* ✏️ Typo

* 🌈  Organise colors with vars only

* ⚒️ Restructured Sass organisation (#83)

*  🌈  Organise colors with vars only

*  ➕ New file structure

* File restructuring

*  ⚒️ Fix build issue

* Rearranged files

* ➕ Adding "hysterical" to the list (#90)

* ➕ Add definition for hysteria

* ✏️ Crazy: A few alternatives: obnoxious, wild (#91)

* ⚙️ Add linting and CI infrastructure (#85)

* Add husky and lint-staged, run lint and test in precommit hook

* Add CI for test and lint

* Apply eslint fixes in precommit hook

* ⚙️ Add stylelint and base configuration (see #74) (#92)

* tooling: add stylelint and base configuration (see #74)

* Autofix with stylelint on commit

* 🚫  Ignore sass-cache

* 🐛 Fixed red flag splitting across two lines (#79)

* Fix red flag splitting across two lines

Added white-space: nowrap to .flag_red and added new properties to link within toc to compensate for nowrap.

* Reverting back to original state.

* Revisited line wrap issue.

Co-authored-by: Tatiana Mac <github@tatianamac.com>

* 📄 Add Detail Pages for Definitions (#75)

* fix: untrack definitions in dist

* feat(detail pages): update item link

* feat(detail pages): add layout

* feat(detail pages): render whole definition content

* feat(detail pages): remove definitons from homepage

* 🧹 def list component

* feat(layout): render site footer in all pages

* feat(detail pages): rename definition root class && move css into partials

* chore: abstract further css into own files

* feat(detail pages): update headling level of definition content

* feat(styles): set box sizing

* feat(styles): add margin bottom utility

* feat(styles): selection

* feat(components): sub page header own component

* feat(detail pages): add sections

* feat(style): mian headline

* feat(page layout): rename page content grid

* feat(page layout): add wide content class

* feat(detail pages): set document title

* feat(detail pages): set uniform document title for docs and definitions

* feat(page title): add comment

* feat(detail pages): add meta description

* feat(detail pages): wrap def header in article tag

* chore: set up ava

* feat(filters): move permalink function into file, add test

* chore: rename _temp to _util, remove creation script

* feat(detail pages): helper function to find additional definitions

* chore: move helpers to single directory

* feat(detail pages): create shortcode for further definition navigation

* feat(detail pages): fix find defs function

* feat(detail pages): shortcode for browse nav markup

* chore: fix collection mock data

* feat(detail pages): render browse nav

* feat(detail pages): style browse nav, style improvements

* feat(detail pages): test redirect

* feat(detail pages): client side redirect

* feat(homepage): set title

* 💅

* feat(detail pages): incorporate design changes

* feat(detail pages): hide browse headlines

* feat(detail pages): label lists

* feat(footer): add aria label

* feat(detail pages): redice heading level in md

* feat(detail pages): spacing in browse nav

* feat(detail pages): reduce line height

* feat(detail pages): set max width w/o breaking homepage

* feat(detail pages): replace in-definition definition links

* 🧹

* feat(detail pages): recover spacing utility

* 🧹

* chore(packages): update ava

* config: specify nvm version

* 💅

* 💅

* chore: update package-lock

* chore: specify engines

* chore: run lint and test before pushing

Co-authored-by: Ned Zimmerman <ned@bight.dev>
Co-authored-by: Damien Cosset <damcossetfreelance@gmail.com>
Co-authored-by: Tatiana Mac <github@tatianamac.com>
Co-authored-by: Alexis Watson <47117571+alexiswatson@users.noreply.github.com>
Co-authored-by: tatianamac <tatiana.t.mac@gmail.com>
Co-authored-by: Aaron Gustafson <aaron@easy-designs.net>
Co-authored-by: Michael Spellacy (Spell) <spell@spellacy.net>
Tagada85 pushed a commit to Tagada85/selfdefined that referenced this pull request May 10, 2020
* Add husky and lint-staged, run lint and test in precommit hook

* Add CI for test and lint

* Apply eslint fixes in precommit hook
Tagada85 added a commit to Tagada85/selfdefined that referenced this pull request May 10, 2020
* Add a Sass function to convert pixels to rems (resolve selfdefined#67)

* chore(packages): eleventy@0.10.0

* Rename function, replace pixel usage with rem conversions

* typo gaslighting

* Move pxToRem to functions partial

* feat(eslint): install eslint && prettier config

* chore: move findExistingDefinition into own file

* chore: set up ava

# Conflicts:
#	package-lock.json
#	package.json

* feat(filters): move permalink function into file, add test

# Conflicts:
#	.eleventy.js

* feat(permalink): revert cherry-picked changes to structure

* chore: update package-lock with ava

* config(eslint): specify source type

* Issue selfdefined#51: Updated definition of polyamory.

* ✏️ Typo

* 🌈  Organise colors with vars only

* ⚒️ Restructured Sass organisation (selfdefined#83)

*  🌈  Organise colors with vars only

*  ➕ New file structure

* File restructuring

*  ⚒️ Fix build issue

* Rearranged files

* ➕ Adding "hysterical" to the list (selfdefined#90)

* ➕ Add definition for hysteria

* ✏️ Crazy: A few alternatives: obnoxious, wild (selfdefined#91)

* ⚙️ Add linting and CI infrastructure (selfdefined#85)

* Add husky and lint-staged, run lint and test in precommit hook

* Add CI for test and lint

* Apply eslint fixes in precommit hook

* ⚙️ Add stylelint and base configuration (see selfdefined#74) (selfdefined#92)

* tooling: add stylelint and base configuration (see selfdefined#74)

* Autofix with stylelint on commit

* 🚫  Ignore sass-cache

* 🐛 Fixed red flag splitting across two lines (selfdefined#79)

* Fix red flag splitting across two lines

Added white-space: nowrap to .flag_red and added new properties to link within toc to compensate for nowrap.

* Reverting back to original state.

* Revisited line wrap issue.

Co-authored-by: Tatiana Mac <github@tatianamac.com>

* 📄 Add Detail Pages for Definitions (selfdefined#75)

* fix: untrack definitions in dist

* feat(detail pages): update item link

* feat(detail pages): add layout

* feat(detail pages): render whole definition content

* feat(detail pages): remove definitons from homepage

* 🧹 def list component

* feat(layout): render site footer in all pages

* feat(detail pages): rename definition root class && move css into partials

* chore: abstract further css into own files

* feat(detail pages): update headling level of definition content

* feat(styles): set box sizing

* feat(styles): add margin bottom utility

* feat(styles): selection

* feat(components): sub page header own component

* feat(detail pages): add sections

* feat(style): mian headline

* feat(page layout): rename page content grid

* feat(page layout): add wide content class

* feat(detail pages): set document title

* feat(detail pages): set uniform document title for docs and definitions

* feat(page title): add comment

* feat(detail pages): add meta description

* feat(detail pages): wrap def header in article tag

* chore: set up ava

* feat(filters): move permalink function into file, add test

* chore: rename _temp to _util, remove creation script

* feat(detail pages): helper function to find additional definitions

* chore: move helpers to single directory

* feat(detail pages): create shortcode for further definition navigation

* feat(detail pages): fix find defs function

* feat(detail pages): shortcode for browse nav markup

* chore: fix collection mock data

* feat(detail pages): render browse nav

* feat(detail pages): style browse nav, style improvements

* feat(detail pages): test redirect

* feat(detail pages): client side redirect

* feat(homepage): set title

* 💅

* feat(detail pages): incorporate design changes

* feat(detail pages): hide browse headlines

* feat(detail pages): label lists

* feat(footer): add aria label

* feat(detail pages): redice heading level in md

* feat(detail pages): spacing in browse nav

* feat(detail pages): reduce line height

* feat(detail pages): set max width w/o breaking homepage

* feat(detail pages): replace in-definition definition links

* 🧹

* feat(detail pages): recover spacing utility

* 🧹

* chore(packages): update ava

* config: specify nvm version

* 💅

* 💅

* chore: update package-lock

* chore: specify engines

* chore: run lint and test before pushing

Co-authored-by: Ned Zimmerman <ned@bight.dev>
Co-authored-by: Damien Cosset <damcossetfreelance@gmail.com>
Co-authored-by: Tatiana Mac <github@tatianamac.com>
Co-authored-by: Alexis Watson <47117571+alexiswatson@users.noreply.github.com>
Co-authored-by: tatianamac <tatiana.t.mac@gmail.com>
Co-authored-by: Aaron Gustafson <aaron@easy-designs.net>
Co-authored-by: Michael Spellacy (Spell) <spell@spellacy.net>
tatianamac added a commit that referenced this pull request May 23, 2020
* added french translations ok-sign

* added gaslighting french translation

* translation gaslighting

* fix some typos

* added ableism traduction

* added ableism traduction

* fix some missing accents

* Improve CONTRIBUTING.md

* Add a Sass function to convert pixels to rems (resolve #67)

* Update CONTRIBUTING.md

Addressed comments

* Removed wrong link

* Update CONTRIBUTING.md

Add help info and fix style

* Update CONTRIBUTING.md

* Propose definition: biromantic

* Fix typo on the link text of Minoritized

* ➕ Add funding

* Rename function, replace pixel usage with rem conversions

* added french translations ok-sign

* typo gaslighting

* added gaslighting french translation

* Move pxToRem to functions partial

* chore: set up ava

# Conflicts:
#	package-lock.json
#	package.json

* feat(filters): move permalink function into file, add test

# Conflicts:
#	.eleventy.js

* feat(eslint): install eslint && prettier config

* chore: move findExistingDefinition into own file

* feat(permalink): revert cherry-picked changes to structure

* chore: update package-lock with ava

* config(eslint): specify source type

* Issue #51: Updated definition of polyamory.

* translation gaslighting

* ✏️ Typo

* 🌈  Organise colors with vars only

* fix some typos

* added ableism traduction

* added ableism traduction

* ⚒️ Restructured Sass organisation (#83)

*  🌈  Organise colors with vars only

*  ➕ New file structure

* File restructuring

*  ⚒️ Fix build issue

* Rearranged files

* ➕ Adding "hysterical" to the list (#90)

* ➕ Add definition for hysteria

* ✏️ Crazy: A few alternatives: obnoxious, wild (#91)

* ⚙️ Add linting and CI infrastructure (#85)

* Add husky and lint-staged, run lint and test in precommit hook

* Add CI for test and lint

* Apply eslint fixes in precommit hook

* ⚙️ Add stylelint and base configuration (see #74) (#92)

* tooling: add stylelint and base configuration (see #74)

* Autofix with stylelint on commit

* 🚫  Ignore sass-cache

* 🐛 Fixed red flag splitting across two lines (#79)

* Fix red flag splitting across two lines

Added white-space: nowrap to .flag_red and added new properties to link within toc to compensate for nowrap.

* Reverting back to original state.

* Revisited line wrap issue.

Co-authored-by: Tatiana Mac <github@tatianamac.com>

* 📄 Add Detail Pages for Definitions (#75)

* fix: untrack definitions in dist

* feat(detail pages): update item link

* feat(detail pages): add layout

* feat(detail pages): render whole definition content

* feat(detail pages): remove definitons from homepage

* 🧹 def list component

* feat(layout): render site footer in all pages

* feat(detail pages): rename definition root class && move css into partials

* chore: abstract further css into own files

* feat(detail pages): update headling level of definition content

* feat(styles): set box sizing

* feat(styles): add margin bottom utility

* feat(styles): selection

* feat(components): sub page header own component

* feat(detail pages): add sections

* feat(style): mian headline

* feat(page layout): rename page content grid

* feat(page layout): add wide content class

* feat(detail pages): set document title

* feat(detail pages): set uniform document title for docs and definitions

* feat(page title): add comment

* feat(detail pages): add meta description

* feat(detail pages): wrap def header in article tag

* chore: set up ava

* feat(filters): move permalink function into file, add test

* chore: rename _temp to _util, remove creation script

* feat(detail pages): helper function to find additional definitions

* chore: move helpers to single directory

* feat(detail pages): create shortcode for further definition navigation

* feat(detail pages): fix find defs function

* feat(detail pages): shortcode for browse nav markup

* chore: fix collection mock data

* feat(detail pages): render browse nav

* feat(detail pages): style browse nav, style improvements

* feat(detail pages): test redirect

* feat(detail pages): client side redirect

* feat(homepage): set title

* 💅

* feat(detail pages): incorporate design changes

* feat(detail pages): hide browse headlines

* feat(detail pages): label lists

* feat(footer): add aria label

* feat(detail pages): redice heading level in md

* feat(detail pages): spacing in browse nav

* feat(detail pages): reduce line height

* feat(detail pages): set max width w/o breaking homepage

* feat(detail pages): replace in-definition definition links

* 🧹

* feat(detail pages): recover spacing utility

* 🧹

* chore(packages): update ava

* config: specify nvm version

* 💅

* 💅

* 🏡 eleventy@0.10.0 (#76)

* Add a Sass function to convert pixels to rems (resolve #67)

* chore(packages): eleventy@0.10.0

* Rename function, replace pixel usage with rem conversions

* typo gaslighting

* Move pxToRem to functions partial

* feat(eslint): install eslint && prettier config

* chore: move findExistingDefinition into own file

* chore: set up ava

# Conflicts:
#	package-lock.json
#	package.json

* feat(filters): move permalink function into file, add test

# Conflicts:
#	.eleventy.js

* feat(permalink): revert cherry-picked changes to structure

* chore: update package-lock with ava

* config(eslint): specify source type

* Issue #51: Updated definition of polyamory.

* ✏️ Typo

* 🌈  Organise colors with vars only

* ⚒️ Restructured Sass organisation (#83)

*  🌈  Organise colors with vars only

*  ➕ New file structure

* File restructuring

*  ⚒️ Fix build issue

* Rearranged files

* ➕ Adding "hysterical" to the list (#90)

* ➕ Add definition for hysteria

* ✏️ Crazy: A few alternatives: obnoxious, wild (#91)

* ⚙️ Add linting and CI infrastructure (#85)

* Add husky and lint-staged, run lint and test in precommit hook

* Add CI for test and lint

* Apply eslint fixes in precommit hook

* ⚙️ Add stylelint and base configuration (see #74) (#92)

* tooling: add stylelint and base configuration (see #74)

* Autofix with stylelint on commit

* 🚫  Ignore sass-cache

* 🐛 Fixed red flag splitting across two lines (#79)

* Fix red flag splitting across two lines

Added white-space: nowrap to .flag_red and added new properties to link within toc to compensate for nowrap.

* Reverting back to original state.

* Revisited line wrap issue.

Co-authored-by: Tatiana Mac <github@tatianamac.com>

* 📄 Add Detail Pages for Definitions (#75)

* fix: untrack definitions in dist

* feat(detail pages): update item link

* feat(detail pages): add layout

* feat(detail pages): render whole definition content

* feat(detail pages): remove definitons from homepage

* 🧹 def list component

* feat(layout): render site footer in all pages

* feat(detail pages): rename definition root class && move css into partials

* chore: abstract further css into own files

* feat(detail pages): update headling level of definition content

* feat(styles): set box sizing

* feat(styles): add margin bottom utility

* feat(styles): selection

* feat(components): sub page header own component

* feat(detail pages): add sections

* feat(style): mian headline

* feat(page layout): rename page content grid

* feat(page layout): add wide content class

* feat(detail pages): set document title

* feat(detail pages): set uniform document title for docs and definitions

* feat(page title): add comment

* feat(detail pages): add meta description

* feat(detail pages): wrap def header in article tag

* chore: set up ava

* feat(filters): move permalink function into file, add test

* chore: rename _temp to _util, remove creation script

* feat(detail pages): helper function to find additional definitions

* chore: move helpers to single directory

* feat(detail pages): create shortcode for further definition navigation

* feat(detail pages): fix find defs function

* feat(detail pages): shortcode for browse nav markup

* chore: fix collection mock data

* feat(detail pages): render browse nav

* feat(detail pages): style browse nav, style improvements

* feat(detail pages): test redirect

* feat(detail pages): client side redirect

* feat(homepage): set title

* 💅

* feat(detail pages): incorporate design changes

* feat(detail pages): hide browse headlines

* feat(detail pages): label lists

* feat(footer): add aria label

* feat(detail pages): redice heading level in md

* feat(detail pages): spacing in browse nav

* feat(detail pages): reduce line height

* feat(detail pages): set max width w/o breaking homepage

* feat(detail pages): replace in-definition definition links

* 🧹

* feat(detail pages): recover spacing utility

* 🧹

* chore(packages): update ava

* config: specify nvm version

* 💅

* 💅

* chore: update package-lock

* chore: specify engines

* chore: run lint and test before pushing

Co-authored-by: Ned Zimmerman <ned@bight.dev>
Co-authored-by: Damien Cosset <damcossetfreelance@gmail.com>
Co-authored-by: Tatiana Mac <github@tatianamac.com>
Co-authored-by: Alexis Watson <47117571+alexiswatson@users.noreply.github.com>
Co-authored-by: tatianamac <tatiana.t.mac@gmail.com>
Co-authored-by: Aaron Gustafson <aaron@easy-designs.net>
Co-authored-by: Michael Spellacy (Spell) <spell@spellacy.net>

* Updated "Ways to Help" section (#93)

* Updated Ways to Help section

* Update index.njk

* Update _grid.scss

* Update index.njk

Co-authored-by: Mekhnetsova, Ekaterina <ekaterina.mekhnetsova@intel.com>

* ⚒️ Add a `pageStyles` block to base template (#98)

* Import typekit fonts as link

* Declare pageStyles block in base template

* Uninstall prism-themes package

* 🖌️ fix order of rule set (#99)

Co-authored-by: Tatiana Mac <github@tatianamac.com>

* ➕ Add dumb definition

* ➕ Add dumb definition

* ➕ Added Asian terms and subterms, Orientalism

* ➕ Add definitions for Hispanic, Latino and Latinx (#89)

* Add definitions for Hispanic, Latino and Latinx

* Update hispanic, latino and latinx definitions to indicate their pan-ethnic connotations.

* 🎨 Enhance :focus style for a11y

* Adding link changes with text-decoration and background

* Update assets/css/base/_a.scss

Co-Authored-By: EJ Mason <eliasjmason@gmail.com>

* Add SCSS variable

Co-authored-by: Conlin Durbin <conlin@lessonly.com>
Co-authored-by: EJ Mason <eliasjmason@gmail.com>
Co-authored-by: Tatiana Mac <github@tatianamac.com>

* 🐛 Add headings, label lists, remove aria-labels for a11y (#109)

Co-authored-by: Tatiana Mac <github@tatianamac.com>

* 📎 Added financial contributors to the README (#107)

Co-authored-by: Tatiana Mac <github@tatianamac.com>

* ➕ Add definition for tone-deaf (#112)

* ➕ Added Asian terms and subterms, Orientalism

* ➕ Add misia, update fatphobia

* ➕ Add tone-deaf

* 🚩 Changed flag to medical appropriation

* 🐛 Fixed indentation issue, broke build

* ➕ feat: add overrepresented majoirty (#115)

* ✏️ Add "shallow" as possible alternative for "dumb" (#113)

eg: This may sound shallow, but I'd really like my next job to have excellent food.

Co-authored-by: Tatiana Mac <github@tatianamac.com>

* ➕ Add definition for overrepresented majority, underrepresented minority (#116)

* ➕ Added Asian terms and subterms, Orientalism

* feat: add overrepresented majoirty

* ➕  [DRAFT] Added overrepresented-majority

* Adding underrepresented minority

* 🐛 Fixes flag build issue

* Improve interlinking

* flag:

Co-authored-by: Tierney Cyren <hello@bnb.im>

* Fixes term link issue

* Flag update

* Fixes link issues

* Adds manual interlinking to minoritised

* fix some missing accents

* cisgenre + white fragility def

Co-authored-by: Ekaterina Mekhnetsova <outoftardis@users.noreply.github.com>
Co-authored-by: Ned Zimmerman <ned@bight.dev>
Co-authored-by: Dan <dan.abramov@gmail.com>
Co-authored-by: Nathanael CHERRIER <dev@nathanaelcherrier.com>
Co-authored-by: Tatiana Mac <github@tatianamac.com>
Co-authored-by: Oscar <o@ovl.design>
Co-authored-by: Alexis Watson <47117571+alexiswatson@users.noreply.github.com>
Co-authored-by: tatianamac <tatiana.t.mac@gmail.com>
Co-authored-by: Aaron Gustafson <aaron@easy-designs.net>
Co-authored-by: Michael Spellacy (Spell) <spell@spellacy.net>
Co-authored-by: Oscar <ovlb@users.noreply.github.com>
Co-authored-by: Mekhnetsova, Ekaterina <ekaterina.mekhnetsova@intel.com>
Co-authored-by: EJ Mason <eliasjmason@gmail.com>
Co-authored-by: Kevin Garcia <hello@kevingarcia.me>
Co-authored-by: Conlin Durbin <conlindurbin@protonmail.com>
Co-authored-by: Conlin Durbin <conlin@lessonly.com>
Co-authored-by: Sarah Higley <smhigley@users.noreply.github.com>
Co-authored-by: jess <jessachandler@gmail.com>
Co-authored-by: Tierney Cyren <accounts@bnb.im>
Co-authored-by: Sophie Alpert <git@sophiebits.com>
Co-authored-by: Tierney Cyren <hello@bnb.im>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use axe-core to set up automated accessibility testing
3 participants