Skip to content

Commit

Permalink
Set up eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
aabdaab committed Feb 5, 2020
1 parent 318b921 commit f63115e
Show file tree
Hide file tree
Showing 23 changed files with 9,383 additions and 158 deletions.
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
/build
55 changes: 55 additions & 0 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
---
extends: [
prettier,
vizzuality
]
env:
node: true
es6: true
browser: true
globals:
require: true
config: true
__DEV__: true
parser: babel-eslint
parserOptions:
ecmaVersion: 7
ecmaFeatures:
jsx: true
sourceType: module
plugins: [react, prettier, react-hooks]

rules:
max-len: [1, 140, 2, {"ignoreUrls":true}]
comma-dangle: [error, never]
no-console: [error, allow: [warn, error, info]]
no-plusplus: ["error", { "allowForLoopAfterthoughts": true }]
arrow-parens: 0
import/extensions: [error, {"js": never, "jsx": never}]
import/no-unresolved: 0
import/no-extraneous-dependencies: 0
no-use-before-define: 0
no-underscore-dangle: 0
react/forbid-prop-types: 0
react/prefer-stateless-function: 0
jsx-a11y/href-no-hash: 0
react/jsx-indent: "off"
react/jsx-filename-extension: 0
react/sort-comp: 0
react/no-find-dom-node: 0
react/no-array-index-key: 0
react/no-danger: 0
react-hooks/rules-of-hooks: "error"
react-hooks/exhaustive-deps: "warn"
camelcase: 0
no-mixed-operators: 0
class-methods-use-this: 0
import/prefer-default-export: 0
settings:
import/resolver:
node:
extensions:
- .js
- .jsx
moduleDirectory:
- node_modules
2 changes: 1 addition & 1 deletion constants.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const WORDPRESS_GFW_API = "https://dev-global-forest-watch-blog.pantheonsite.io/wp-json";
export const WORDPRESS_GFW_API = 'https://dev-global-forest-watch-blog.pantheonsite.io/wp-json';
62 changes: 31 additions & 31 deletions frontity.settings.js
Original file line number Diff line number Diff line change
@@ -1,58 +1,58 @@
import { WORDPRESS_GFW_API } from './constants.js';
import { WORDPRESS_GFW_API } from './constants';

const settings = {
"name": "gfw-blog-redesign",
"state": {
"frontity": {
"url": "https://test.frontity.io",
"title": "Test Frontity Blog",
"description": "WordPress installation for Frontity development"
name: 'gfw-blog-redesign',
state: {
frontity: {
url: 'https://test.frontity.io',
title: 'Test Frontity Blog',
description: 'WordPress installation for Frontity development'
}
},
"packages": [
packages: [
{
"name": "@frontity/mars-theme",
"state": {
"theme": {
"menu": [
name: '@frontity/mars-theme',
state: {
theme: {
menu: [
[
"Home",
"/"
'Home',
'/'
],
[
"Nature",
"/category/nature/"
'Nature',
'/category/nature/'
],
[
"Travel",
"/category/travel/"
'Travel',
'/category/travel/'
],
[
"Japan",
"/tag/japan/"
'Japan',
'/tag/japan/'
],
[
"About Us",
"/about-us/"
'About Us',
'/about-us/'
]
],
"featured": {
"showOnList": false,
"showOnPost": false
featured: {
showOnList: false,
showOnPost: false
}
}
}
},
{
"name": "@frontity/wp-source",
"state": {
"source": {
"api": WORDPRESS_GFW_API
name: '@frontity/wp-source',
state: {
source: {
api: WORDPRESS_GFW_API
}
}
},
"@frontity/tiny-router",
"@frontity/html2react"
'@frontity/tiny-router',
'@frontity/html2react'
]
};

Expand Down
Loading

0 comments on commit f63115e

Please sign in to comment.