archesproject / arches

Arches is a web platform for creating, managing, & visualizing geospatial data. Arches was inspired by the needs of the Cultural Heritage community, particularly the widespread need of organizations to build & manage cultural heritage inventories
GNU Affero General Public License v3.0
212 stars 142 forks source link

Only check project src directory on precommit #11033

Closed johnatawnclementawn closed 3 months ago

johnatawnclementawn commented 3 months ago

Types of changes

Description of Change

Reduces drift in configuration of precommit and package.json scripts

Issues Solved

Closes #

Checklist

Accessibility Checklist

Developer Guide

Topic Changed Retested
Color contrast
Form fields
Headings
Links
Keyboard
Responsive Design
HTML validation
Screen reader

Ticket Background

Further comments

jacobtylerwalls commented 3 months ago

We were finding that without this change, a manage.py updateproject (after the latest webpack changes that just landed) created unstaged files under /webpack that were linted by pre-commit in unintended ways (e.g. messages about forbidding require that only make sense for typescript).

We could consider linting these files in the future, but since we're not linting them in core, suggest not to lint them in projects. The invocation through npm run ... was already excluding them, so as Johnathan mentions, the idea here is to just remove the drift.