Skip to content

Commit

Permalink
Integrate Relay Modern and create-react-app (#238)
Browse files Browse the repository at this point in the history
  • Loading branch information
koistya authored Aug 7, 2017
1 parent a9dc63e commit 8028d3f
Show file tree
Hide file tree
Showing 99 changed files with 4,929 additions and 4,917 deletions.
24 changes: 24 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Javascript Node CircleCI 2.0 configuration file
# Check https://circleci.com/docs/2.0/language-javascript/ for more details

version: 2

jobs:
build:
docker:
- image: kriasoft/node-ci:8.2.1-alpine
working_directory: ~/repo
steps:
- checkout
- setup_remote_docker
# Download and cache dependencies
- restore_cache:
key: yarn-cache-{{ checksum "yarn.lock" }}
- run: yarn install --no-progress
- save_cache:
key: yarn-cache-{{ checksum "yarn.lock" }}
paths:
- node_modules
# Run unit tests
- run: yarn lint
- run: yarn test
19 changes: 8 additions & 11 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# http://editorconfig.org

# For more information about the properties used in
# this file, please see the EditorConfig documentation:
# http://editorconfig.org/

root = true

[*]

# Change these settings to your own preference
indent_style = space
indent_size = 2

# We recommend you to keep these unchanged
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false
20 changes: 20 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/**
* React Static Boilerplate
* Copyright (c) 2015-present Kriasoft. All rights reserved.
*/

/* @flow */

module.exports = {
extends: ['eslint-config-react-app', 'prettier'],
plugins: ['flowtype', 'prettier'],
rules: {
'prettier/prettier': [
'error',
{
singleQuote: true,
trailingComma: 'all',
},
],
},
};
11 changes: 11 additions & 0 deletions .flowconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[ignore]
.*/build
.*/docs
.*/node_modules
.*/public

[include]

[options]
module.system.node.resolve_dirname=node_modules
module.system.node.resolve_dirname=src
8 changes: 6 additions & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@

# Automatically normalize line endings for all text-based files
# http://git-scm.com/docs/gitattributes#_end_of_line_conversion
# https://git-scm.com/docs/gitattributes#_end_of_line_conversion

* text=auto

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

# For the following file types, normalize line endings to LF on
# checkin and prevent conversion to CRLF when they are checked out
# (this is required in order to prevent newline related issues like,
# for example, after the build script is run)

.* text eol=lf
*.css text eol=lf
*.html text eol=lf
*.js text eol=lf
*.json text eol=lf
*.md text eol=lf
*.txt text eol=lf

33 changes: 23 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,27 @@
# Include your project-specific ignores in this file
# Read about how to use .gitignore: https://help.github.com/articles/ignoring-files
# See https://help.github.com/ignore-files/ for more about ignoring files

# Compiled output
public/dist
public/index.html
public/sitemap.xml
# Dependencies
/node_modules

# Node.js and NPM
node_modules
npm-debug.log
# Testing
/coverage

# Firebase
firebase-debug.log
# Production
/build

# Misc
__generated__
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*

# VS Code
.vscode/*
!.vscode/settings.json
56 changes: 56 additions & 0 deletions .stylelintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
/**
* React Static Boilerplate
* Copyright (c) 2015-present Kriasoft. All rights reserved.
*/

const primerConfig = require('stylelint-config-primer');

// stylelint configuration
// https://stylelint.io/user-guide/configuration/
module.exports = {
extends: 'stylelint-config-standard',

plugins: [
// stylelint plugin to sort CSS rules content with specified order
// https://github.com/hudochenkov/stylelint-order
'stylelint-order',
],

rules: {
'property-no-unknown': [
true,
{
ignoreProperties: [
// CSS Modules composition
// https://github.com/css-modules/css-modules#composition
'composes',
],
},
],

'selector-pseudo-class-no-unknown': [
true,
{
ignorePseudoClasses: [
// CSS Modules :global scope
// https://github.com/css-modules/css-modules#exceptions
'global',
],
},
],

// https://github.com/hudochenkov/stylelint-order/blob/master/rules/order/README.md
'order/order': [
'custom-properties',
'dollar-variables',
'declarations',
'at-rules',
'rules',
],

'string-quotes': 'single',

// https://github.com/hudochenkov/stylelint-order/blob/master/rules/properties-order/README.md
'order/properties-order': primerConfig.rules['order/properties-order'],
},
};
14 changes: 0 additions & 14 deletions .travis.yml

This file was deleted.

12 changes: 12 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"editor.formatOnSave": true,
"flow.useNPMPackagedFlow": true,
"javascript.format.enable": false,
"javascript.validate.enable": false,
"prettier.eslintIntegration": true,
"vsicons.presets.angular": false,
"search.exclude": {
"**/build": true,
"**/node_modules": true
}
}
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License

Copyright (c) 2015-present Kriasoft, LLC. All rights reserved.
Copyright (c) 2015-present Kriasoft. All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
Loading

0 comments on commit 8028d3f

Please sign in to comment.