Skip to content

Commit

Permalink
Package formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Trinityyi committed Sep 19, 2020
1 parent 4e0891c commit 9cf8554
Show file tree
Hide file tree
Showing 9 changed files with 183 additions and 24 deletions.
167 changes: 167 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
{
"extends": "react-app",
"rules": {
"indent": [
"error",
2
],
"quotes": [
"error",
"single",
{
"avoidEscape": true,
"allowTemplateLiterals": true
}
],
"semi": [
"error",
"always"
],
"semi-spacing": [
"error",
{
"before": false,
"after": false
}
],
"no-trailing-spaces": "error",
"no-duplicate-imports": "error",
"no-useless-computed-key": "error",
"rest-spread-spacing": [
"error",
"never"
],
"no-console": "off",
"eqeqeq": [
"error",
"smart"
],
"brace-style": [
"error",
"1tbs",
{
"allowSingleLine": true
}
],
"curly": [
"error",
"multi-or-nest"
],
"object-shorthand": [
"warn",
"always"
],
"key-spacing": [
"error",
{
"beforeColon": false,
"afterColon": true,
"mode": "strict"
}
],
"camelcase": [
"error",
{
"properties": "always"
}
],
"dot-location": [
"error",
"property"
],
"generator-star-spacing": [
"error",
{
"before": true,
"after": false
}
],
"block-spacing": [
"error",
"always"
],
"comma-style": [
"error",
"last"
],
"comma-spacing": [
"error",
{
"before": false,
"after": true
}
],
"no-extend-native": "error",
"no-loop-func": "error",
"no-implied-eval": "error",
"no-iterator": "error",
"no-label-var": "error",
"no-multi-str": "error",
"no-script-url": "error",
"no-shadow-restricted-names": "error",
"no-spaced-func": "error",
"no-sparse-arrays": "warn",
"no-fallthrough": "warn",
"no-caller": "error",
"no-eval": "error",
"no-multiple-empty-lines": [
"error",
{
"max": 2,
"maxEOF": 1
}
],
"no-multi-spaces": [
"error",
{
"ignoreEOLComments": true
}
],
"no-negated-in-lhs": "error",
"no-new": "error",
"no-new-require": "error",
"block-scoped-var": "error",
"no-use-before-define": "warn",
"no-proto": "error",
"complexity": [
"warn",
50
],
"wrap-iife": [
"error",
"outside"
],
"new-parens": "error",
"space-infix-ops": "error",
"eol-last": [
"error",
"always"
],
"space-unary-ops": "error",
"arrow-parens": [
"error",
"as-needed"
],
"arrow-spacing": "error",
"space-before-blocks": [
"error",
"always"
],
"yoda": [
"error",
"never"
],
"space-before-function-paren": [
"error",
"never"
],
"spaced-comment": [
"error",
"always"
],
"object-curly-spacing":[
"error",
"always"
]
}
}
4 changes: 0 additions & 4 deletions .prettierignore

This file was deleted.

4 changes: 0 additions & 4 deletions .prettierrc

This file was deleted.

4 changes: 2 additions & 2 deletions data/demo.csv
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ itemName;itemDescription;itemPrice;categoryName;familyName;modelName;imageUrl;ta
400 gr;This is so juicy! Oh my God!;10.50;Burgers;Menu;Juicy Burger;;Juicy
800 gr;This is so juicy! Oh my God!;14.50;Burgers;Menu;Juicy Burger;;Juicy
Spicy Mexican;So hot you will die!;8.00;Burgers;Menu;;;Hot
Veganito;No meat, just veggies.;5.80;Burger;Menu;;;Vegan
Veganito;No meat, just veggies.;5.80;Burgers;Menu;;;Vegan
330ml;Good year, good beer;3.30;Beer;Drinks;Beeritsa (Draught);;Draught
500ml;Good year, good beer;4.50;Beer;Drinks;Beeritsa (Draught);;Draught
1l;Good year, good beer;6.00;Beer;Drinks;Beeritsa (Draught);;Draught
Glass (250ml);The bestest of wines;4.00;Wine;Drinks;White wine;;
Bottle (750ml);The bestest of wines;9.00;Wine;Drunks;White wine;;
Bottle (750ml);The bestest of wines;9.00;Wine;Drinks;White wine;;
4 changes: 2 additions & 2 deletions data/other.csv
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ itemName;itemDescription;itemPrice;categoryName;familyName;modelName;imageUrl;ta
500 gr;This is so Black Angus! Oh my God!;10.50;Burgers;Menu;Black Angus Burger;;Angus
850 gr;This is so Black Angus! Oh my God!;14.50;Burgers;Menu;Black Angus Burger;;Angus
Hot Potato;So hot you will think it's spicy!;8.00;Burgers;Menu;;;Spicy,Vegan
New Girl;Femininity at its best.;3.90;Burger;Menu;;;New,Vegan,Healthy
New Girl;Femininity at its best.;3.90;Burgers;Menu;;;New,Vegan,Healthy
330ml;Good year, good beer;3.30;Beer;Drinks;Beeritsa (Draught);;Draught
500ml;Good year, good beer;4.50;Beer;Drinks;Beeritsa (Draught);;Draught
1l;Good year, good beer;6.00;Beer;Drinks;Beeritsa (Draught);;Draught
Glass (250ml);The bestest of wines;4.00;Wine;Drinks;Red wine;;
Pitcher (750ml);The bestest of wines;9.00;Wine;Drunks;Red wine;;
Pitcher (750ml);The bestest of wines;9.00;Wine;Drinks;Red wine;;
8 changes: 4 additions & 4 deletions gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ exports.onCreateNode = ({ node, getNode, actions }) => {
createNodeField({
node,
name: `slug`,
value: slug,
value: slug
});
};
};

exports.createPages = async ({ graphql, actions }) => {
exports.createPages = async({ graphql, actions }) => {
const { createPage } = actions;
const result = await graphql(`
query {
Expand All @@ -31,12 +31,12 @@ exports.createPages = async ({ graphql, actions }) => {
result.data.allDataCsv.edges.forEach(({ node }) => {
createPage({
path: node.fields.slug,
component: path.resolve(`./src/templates/restaurant.js`),
component: path.resolve(`./src/templates/restaurant.jsx`),
context: {
// Data passed to context is available
// in page queries as GraphQL variables.
slug: node.fields.slug
}
});
})
});
};
10 changes: 4 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
{
"name": "gatsby-starter-hello-world",
"name": "dishmi",
"private": true,
"description": "A simplified bare-bones starter for Gatsby",
"description": "e-Menu application",
"version": "0.1.0",
"license": "0BSD",
"license": "MIT",
"scripts": {
"build": "gatsby build",
"develop": "gatsby develop",
"format": "prettier --write \"**/*.{js,jsx,ts,tsx,json,md}\"",
"start": "npm run develop",
"serve": "gatsby serve",
"clean": "gatsby clean",
"test": "echo \"Write tests! -> https://gatsby.dev/unit-testing\" && exit 1"
"clean": "gatsby clean"
},
"dependencies": {
"gatsby": "^2.24.61",
Expand Down
Binary file added static/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 4 additions & 2 deletions tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ module.exports = {
},
purge: [],
theme: {
extend: {},
fontFamily: {
'sans': ['"Alegreya Sans"', 'Helvetica', 'Arial', 'sans-serif']
},
},
variants: {},
plugins: [],
}
};

0 comments on commit 9cf8554

Please sign in to comment.