Skip to content

Commit d0e4388

Browse files
committed
Add eslint
1 parent c78d342 commit d0e4388

11 files changed

+1030
-33
lines changed

.eslintrc.yml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
env:
2+
browser: true
3+
commonjs: true
4+
es6: true
5+
node: true
6+
extends:
7+
- eslint:recommended
8+
- plugin:prettier/recommended
9+
globals:
10+
Atomics: readonly
11+
SharedArrayBuffer: readonly
12+
parserOptions:
13+
ecmaFeatures:
14+
jsx: false
15+
ecmaVersion: 2018
16+
rules:
17+
strict:
18+
- error
19+
- global
20+
no-unused-vars:
21+
- error
22+
- argsIgnorePattern: ^_

docs/.eslintrc.yml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
extends:
2+
- plugin:react/recommended
3+
parser: babel-eslint
4+
parserOptions:
5+
sourceType: module
6+
ecmaFeatures:
7+
jsx: true
8+
settings:
9+
react:
10+
version: detect
11+
rules:
12+
react/prop-types: 0

docs/App.jsx

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
/* eslint-disable react/jsx-key */
2+
/* global COMMITHASH, VERSION */
3+
14
import React, { Component, useState, useEffect } from "react";
25
import { Link, NavLink, Redirect, Route, Switch } from "react-router-dom";
36
import Media from "react-media";
@@ -217,6 +220,7 @@ const renderRoute = component => (
217220
<a
218221
className="lumi"
219222
target="_blank"
223+
rel="noopener noreferrer"
220224
href={component.componentSource}
221225
style={{
222226
marginLeft: "8px",
@@ -229,6 +233,7 @@ const renderRoute = component => (
229233
<a
230234
className="lumi"
231235
target="_blank"
236+
rel="noopener noreferrer"
232237
href={component.exampleSource}
233238
style={{
234239
marginLeft: "8px",
@@ -241,6 +246,7 @@ const renderRoute = component => (
241246
<a
242247
className="lumi"
243248
target="_blank"
249+
rel="noopener noreferrer"
244250
href={component.apiReference}
245251
style={{
246252
marginLeft: "8px"

0 commit comments

Comments
 (0)