Skip to content

Commit

Permalink
Merge pull request #1 from webcompat/master
Browse files Browse the repository at this point in the history
Update to latest version of official repo
  • Loading branch information
tagawa authored Jul 14, 2020
2 parents 14e3c4f + 1d45bf7 commit c7849f7
Show file tree
Hide file tree
Showing 578 changed files with 43,913 additions and 26,302 deletions.
14 changes: 14 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"presets": [
[
"@babel/preset-env",
{
"bugfixes": true,
"modules": false,
"targets": {
"esmodules": true
}
}
]
]
}
79 changes: 79 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# Python CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-python/ for more details
#
version: 2
jobs:
build:
docker:
# specify the version you desire here
# using -node-browsers to get node + firefox + chrome + geckoview
- image: circleci/python:3.7.3-stretch-node-browsers
environment:
FLASK_CONFIG: testing

working_directory: ~/repo

steps:
- checkout
# Download and cache dependencies
- restore_cache:
keys:
- deps1-{{ .Branch }}-{{ checksum "config/requirements-dev.txt" }}
- v1-npm-{{ .Branch }}-{{ checksum "package.json" }}
# - restore_cache:
# keys:
# - v1-pip-{{ checksum "config/requirements-dev.txt" }}
# # fallback to using the latest cache if no exact match is found
# - v1-pip-
# - v1-npm-{{ checksum "package.json" }}
# - v1-npm-
- run:
name: install python deps
command: |
python3 -m venv env
. env/bin/activate
pip install -r config/requirements-dev.txt
- save_cache:
key: deps1-{{ .Branch }}-{{ checksum "config/requirements-dev.txt" }}
paths:
- "env"
# NPM INSTALL
- run:
name: install npm deps
command: |
npm install
- save_cache:
paths:
- ./node_modules
key: v1-npm-{{ .Branch }}-{{ checksum "package.json" }}

- run:
name: Install latest Firefox
command: |
echo "export PATH=/home/circleci/.local/bin:$PATH" >> $BASH_ENV
source $BASH_ENV
pip install --user mozdownload mozinstall
mozdownload --version latest --destination firefox.tar.bz2
mozinstall firefox.tar.bz2
sudo ln -sf /home/circleci/repo/firefox/firefox /usr/local/bin/firefox
firefox --version
which firefox
- run:
name: Run Tests
command: |
. env/bin/activate
NODE_OPTIONS=--max_old_space_size=8192
npm run lint
npm run build
pip install -e .
pytest tests
npm run test:unit-js
python run.py -t &
sleep 5
npx intern
- store_artifacts:
path: test-reports/
destination: test-reports
22 changes: 16 additions & 6 deletions .eslintrc → .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
{
"parserOptions": {
"ecmaVersion": 9,
"sourceType": "module"
},
"env": {
"browser": true
},
Expand All @@ -16,27 +20,33 @@
"Backbone": true,
"console": true,
"define": true,
"issueNumber": true,
"markdownitEmoji": true,
"markdownitSanitizer": true,
"ga": true,
"intern": true,
"md": true,
"module": true,
"moment": true,
"Mousetrap": true,
"PaginationMixin": true,
"Prism": true,
"Promise": true,
"repoPath": true,
"require": true,
"wcEvents": true,
"WindowHelpers": true
"wcTmpl": true,
"WindowHelpers": true,
"Validation": true,
"prefillForm": true,
"setAnalyticsData": true,
"__dirname": true
},
"rules": {
"eqeqeq": [2, "smart"],
"new-cap": 2,
"no-cond-assign": 0,
"no-redeclare": ["error", { "builtinGlobals": false }],
"no-prototype-builtins": "off",
"no-use-before-define": 2,
"one-var": [2, "never"],
"prettier/prettier": "error"
"prettier/prettier": "error",
"no-unused-vars": "off"
}
}
6 changes: 6 additions & 0 deletions .flaskenv
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# These are PUBLIC environment variables
# DO NOT PUT ANY SECRETS HERE
# For your local secrets, use the .env file
FLASK_APP=webcompat:app
FLASK_ENV=development
GITHUB_CALLBACK_URL='http://localhost:5000/callback'
59 changes: 59 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Contributions Guidelines

You are welcome to contribute to this project. Here are the guidelines we try to stick to in this project.


* [Questions or Problems](#questions-or-problems)
* [Filing an Issue](#filing-an-issue)
* [Triaging Issues](#triaging-issues)
* [Finding an Issue to Work On](#finding-an-issue-to-work-on)
* [Feature Requests](#feature-requests)
* [Development Environment setup](../docs/dev-env-setup.md)
* [Pull Request + Code Style Guidelines](../docs/pr-coding-guidelines.md)
* [Tests](../docs/tests.md)
* [Production Server Setup](../docs/prod-server.md)
* [Acknowledgements](#acknowledgements)

Please note that everyone interacting in our codebases, issue trackers, and any other form of communication, including chat rooms and mailing lists, is expected to follow our [code of conduct](https://github.com/webcompat/webcompat.com/blob/master/CODE_OF_CONDUCT.md) so we can all enjoy the effort we put into this project.

## Questions or Problems

If you have a question about the site or about web compatibility in general, feel free to join us in the #webcompat:mozilla.org channel on the Mozilla Matrix network. [Here's how to join](https://wiki.mozilla.org/Matrix#Connect_to_Matrix).

Otherwise, you can try to ping Mike Taylor on the Freenode network with the following command `/msg miketaylr Hi, I have a question about webcompat.com`.

## Filing an Issue

If you're using webcompat.com and something is confusing, broken, or you think it could be done in a better way, please let us know. Issues are how the project moves forward—let us know what's bothering you.

* Search the [issues list](https://github.com/webcompat/webcompat.com/issues) for existing similar issues. Consider adding to an existing issue if you find one.
* Choose a descriptive title.
* Provide a test, snippet of code or screenshot that illustrates the problem. This small gesture goes a long way towards getting a speedy fix.
* If you are able to, please always add a `type` label to the issue. If it fits, you also can add a `scope` and / or `language` label. Feel free to take a look at the [label list](https://github.com/webcompat/webcompat.com/labels) first.

## Triaging Issues

One way to contribute is to triage issues. This could be as simple as confirming a bug, or as complicated as debugging errors and providing fixes. A tiny bit of effort in someone else's issue can go a long way.

## Finding an Issue to Work On

The logic for the issue tracker is this -
* [*Milestones*](https://github.com/webcompat/webcompat.com/milestones) - just look for the current quarter.

Anything labeled ["status: good-first-bug"](https://github.com/webcompat/webcompat.com/labels/status:%20good%20first%20bug) is perfect for getting started!

There's also a `"prio: good-next-bug"` issue when you're ready to tackle something more complex or `"prio: important"` when you are an experienced open source contributor.

> Note: We do not recommend working on more than two `good-first-bugs`, just one when you are a first time contributor. Take it slow and your time to get into the projects' own flow.

## Feature Requests

You can request a new feature by [submitting an issue](#filing-an-issue) to our repo. If you would like to implement a new feature then consider what kind of change it is:

* **Major Changes** that you wish to contribute to the project should be discussed first in an issue so that we can better coordinate our efforts, prevent duplication of work, and help you to craft the change so that it is successfully accepted into the project.
* **Small Changes** can be crafted and submitted as a Pull Request.


## Acknowledgements
A lot of this document was inspired directly by the excellent [Backbone.LayoutManager](https://github.com/tbranyen/backbone.layoutmanager/blob/master/CONTRIBUTING.md) and [Angular.js](https://github.com/angular/angular.js/blob/master/CONTRIBUTING.md#issue) CONTRIBUTING files.
12 changes: 12 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!--
IMPORTANT: Please do not create a Pull Request without creating an issue first.
Read the Guidelines, If you haven't done it yet.
https://github.com/webcompat/webcompat.com/blob/master/docs/pr-coding-guidelines.md
-->

This PR fixes issue #nnnn

## Proposed PR background

Please provide enough information so that others can review your pull request:
31 changes: 21 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
.env
env/
venv/
node_modules/
git_modules/
.DS_Store
Expand All @@ -10,25 +12,34 @@ docs/build/
screenshots/
uploads/
.idea/
.vscode/
config/secrets.py
package-lock.json
tmp/

# backup folder contains the issues.db backup file with issues dump
# for the previous versions
backups/*.db
# Ignore the installable app.
*.egg-info

# The data folder contains information that shouldn't live in version control.
data/*

# these are our 'dist' files
# checking them into the repo is silly
webcompat/static/js/webcompat.js
webcompat/static/js/diagnose.js
webcompat/static/js/issues.js
webcompat/static/js/issue-list.js
webcompat/static/js/user-activity.js
webcompat/static/js/cssfixme.js
webcompat/**/*.min.js
# but don't ignore minified js code in the /vendor/ directory
!webcompat/**/vendor/*.min.js
webcompat/static/js/*.js
webcompat/static/js/build/
webcompat/static/js/dist/
webcompat/**/*.min.css
webcompat/**/*.dev.css
webcompat/static/css/dist/
webcompat/static/dist

#selenium server
*.jar
*.pid
nohup.out

# tests
.noseids
.coverage
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

6 changes: 6 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# See https://prettier.io/docs/en/options.html for available options

# We actually don’t need to configure anything in here, because we adapt the default settings of prettier.
# But we need this file, because otherwise prettier will search up the file tree until to find a config file.
# This will lead to problems if one has settings different from the default settings defined in ~/.prettierrc.
# See https://github.com/webcompat/webcompat.com/issues/2459
70 changes: 70 additions & 0 deletions .stylelintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
{
"extends": "stylelint-config-standard",
"plugins": [
"stylelint-order"
],
"rules": {
"indentation": 2,
"string-quotes": "double",
"no-duplicate-selectors": true,
"color-hex-case": "lower",
"color-hex-length": "short",
"color-named": "never",
"selector-no-qualifying-type": [ true, {"ignore": "attribute"} ],
"selector-max-id": 1,
"selector-max-attribute": 1,
"selector-combinator-space-after": "always",
"selector-attribute-quotes": "always",
"selector-attribute-operator-space-before": "always",
"selector-attribute-operator-space-after": "always",
"selector-attribute-brackets-space-inside": "never",
"declaration-block-trailing-semicolon": "always",
"declaration-no-important": true,
"declaration-colon-space-before": "never",
"declaration-colon-space-after": "always",
"property-no-vendor-prefix": true,
"value-no-vendor-prefix": true,
"number-leading-zero": "never",
"function-url-quotes": "always",
"font-weight-notation": "numeric",
"font-family-name-quotes": "always-where-recommended",
"comment-whitespace-inside": "always",
"comment-empty-line-before": "always",
"at-rule-no-vendor-prefix": true,
"rule-empty-line-before": ["always", {
"except": [
"after-single-line-comment",
"inside-block-and-after-rule"
],
"ignore": [
"after-comment",
"inside-block"
]
}],
"selector-pseudo-element-colon-notation": "double",
"selector-pseudo-class-parentheses-space-inside": "never",
"selector-no-vendor-prefix": true,
"selector-max-universal": 1,
"selector-max-type": 1,
"media-feature-range-operator-space-before": "always",
"media-feature-range-operator-space-after": "always",
"media-feature-parentheses-space-inside": "never",
"media-feature-name-no-vendor-prefix": true,
"media-feature-colon-space-before": "never",
"media-feature-colon-space-after": "always",
"declaration-block-no-duplicate-properties": true,
"declaration-block-no-redundant-longhand-properties": [ true, {"ignoreShorthands": "font"} ],
"no-eol-whitespace": true,
"order/order": [
"custom-properties",
"declarations"
],
"order/properties-alphabetical-order": true
},
"ignoreFiles": [
"./webcompat/static/css/development/vendor/prism.css"
],
"ignoreShorthands": [
"font"
]
}
Loading

0 comments on commit c7849f7

Please sign in to comment.