mirror of
https://github.com/discourse/discourse.git
synced 2024-11-30 23:15:46 +08:00
bdaaac9c9f
## How does this work? Any time a lint rule is added or changed, you can run `yarn lint:fix` to handle all the auto-fixable situations. But not all lints are auto-fixable -- for those, lint-to-the-future has tooling to automatically ignore present violations. An alias has been added for lint-to-the-future to ignore new violations, `yarn lttf:ignore`. The command will add lint-ignore declarations throughout all the files with present violations, which should then be committed. An excerpt from lint-to-the-future's [README](https://github.com/mansona/lint-to-the-future#lint-to-the-future-dashboard): > The point of Lint to the Future is to allow you to progressively update your codebase using new lint rules without overwhelming you with the task. You can easily ignore lint rules using project-based ignores in your config files but that doesn't prevent you from making the same errors in new files. > We chose to do the ignores on a file basis as it is a perfect balance and it means that the tracking/graphing aspects of Lint to the Future provide you with achievable goals, especially in large codebases. ## How do I view progress? lint-to-the-future provides graphs of violations-over-time per lint rule in a dashboard format, so we can track how well we're doing at cleaning up the violations. To view the dashboard locally, run `yarn lint-progress` and visit `http://localhost:8084` (or whatever the port it chose, as it will choose a new port if 8084 is preoccupied) Also there is a `list` command which shows a JSON object of: ```ts { [date: string]: { // yyyy-mm-dd [pluginName: string]: { [fileName: string]: string[]; // list of files with violations } } } ``` ```bash yarn lint-to-the-future list --stdout ``` ## What about lint-todo? Lint todo is another system available for both eslint and ember-template-lint that _forces_ folks to "leave things better than they found them" by being transparent / line-specific ignoring of violations. It was decided that for _this_ project, it made more sense, and would be less disruptive to new contributors to have the ignore declarations explicitly defined in each file (whereas in lint-todo, they are hidden). To effectively use lint-todo, a whole team needs to agree to the workflow, and in open source, we want "just anyway" to be able to contribute, and throwing surprises at them can deter contributions.
73 lines
1.2 KiB
Plaintext
73 lines
1.2 KiB
Plaintext
/copyright
|
|
/coverage
|
|
/data
|
|
/log
|
|
/tmp
|
|
|
|
/.bundle
|
|
/.env
|
|
/.procfile
|
|
/dump.rdb
|
|
|
|
/config/discourse.conf
|
|
/config/discourse.pill
|
|
/config/multisite.yml
|
|
# `discourse_dev` gem
|
|
/config/dev.yml
|
|
|
|
/public/assets
|
|
/public/backups
|
|
/public/csv
|
|
/public/fonts
|
|
/public/plugins
|
|
/public/tombstone
|
|
/public/uploads
|
|
|
|
# Ignore the default SQLite database and db dumps
|
|
*.sql
|
|
*.sql.gz
|
|
!/spec/fixtures/**/*.sql
|
|
/db/*.sqlite3
|
|
/db/structure.sql
|
|
/db/schema.rb
|
|
/db/schema_cache.yml
|
|
|
|
# Plugins except for the bundled ones
|
|
/plugins/*
|
|
!/plugins/discourse-details/
|
|
!/plugins/discourse-local-dates
|
|
!/plugins/discourse-narrative-bot
|
|
!/plugins/discourse-presence
|
|
!/plugins/discourse-lazy-videos/
|
|
!/plugins/chat/
|
|
!/plugins/poll/
|
|
!/plugins/styleguide
|
|
/plugins/*/auto_generated/
|
|
|
|
/spec/fixtures/plugins/my_plugin/auto_generated
|
|
|
|
/vendor/bundle/*
|
|
/vendor/data/GeoLite2-City.mmdb
|
|
/vendor/data/GeoLite2-ASN.mmdb
|
|
|
|
# We provide a .sample but people can use newer versions if they want to
|
|
.ruby-version
|
|
|
|
# Front-end
|
|
dist
|
|
node_modules
|
|
yarn-error.log
|
|
|
|
# Linting artifacts
|
|
.eslintcache
|
|
/lint-progress/
|
|
|
|
# Auto-generated plugin JS assets
|
|
/app/assets/javascripts/plugins/*
|
|
|
|
# Generated API documentation files
|
|
openapi/*
|
|
|
|
# Cached License Data Files
|
|
/.licenses
|