mirror of
https://github.com/owncast/owncast.git
synced 2024-12-18 07:12:33 +03:00
Add linting and code formatting
This commit is contained in:
parent
9623513c9a
commit
fe6c285b43
6 changed files with 1868 additions and 4 deletions
27
web/.eslintrc.js
Normal file
27
web/.eslintrc.js
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
module.exports = {
|
||||||
|
env: {
|
||||||
|
browser: true,
|
||||||
|
es2021: true,
|
||||||
|
},
|
||||||
|
extends: [
|
||||||
|
"plugin:react/recommended",
|
||||||
|
"airbnb",
|
||||||
|
"prettier",
|
||||||
|
"prettier/@typescript-eslint",
|
||||||
|
"prettier/react",
|
||||||
|
],
|
||||||
|
parser: "@typescript-eslint/parser",
|
||||||
|
parserOptions: {
|
||||||
|
ecmaFeatures: {
|
||||||
|
jsx: true,
|
||||||
|
},
|
||||||
|
ecmaVersion: 12,
|
||||||
|
sourceType: "module",
|
||||||
|
},
|
||||||
|
plugins: ["react", "@typescript-eslint"],
|
||||||
|
rules: {
|
||||||
|
"react/react-in-jsx-scope": "off",
|
||||||
|
"react/jsx-filename-extension": [1, { extensions: [".js", ".jsx", ".tsx"] }],
|
||||||
|
"react/jsx-props-no-spreading": "off",
|
||||||
|
},
|
||||||
|
};
|
3
web/.prettierignore
Normal file
3
web/.prettierignore
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
# Ignore artifacts:
|
||||||
|
node_modules
|
||||||
|
out
|
4
web/.prettierrc
Normal file
4
web/.prettierrc
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"tabWidth": 2,
|
||||||
|
"useTabs": false
|
||||||
|
}
|
1823
web/package-lock.json
generated
1823
web/package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -8,6 +8,7 @@
|
||||||
"start": "next start"
|
"start": "next start"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@ant-design/icons": "^4.2.2",
|
||||||
"antd": "^4.6.6",
|
"antd": "^4.6.6",
|
||||||
"next": "9.5.3",
|
"next": "9.5.3",
|
||||||
"react": "16.13.1",
|
"react": "16.13.1",
|
||||||
|
@ -17,6 +18,17 @@
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "^14.11.2",
|
"@types/node": "^14.11.2",
|
||||||
"@types/react": "^16.9.49",
|
"@types/react": "^16.9.49",
|
||||||
|
"@typescript-eslint/eslint-plugin": "^4.3.0",
|
||||||
|
"@typescript-eslint/parser": "^4.3.0",
|
||||||
|
"eslint": "^7.10.0",
|
||||||
|
"eslint-config-airbnb": "^18.2.0",
|
||||||
|
"eslint-config-prettier": "^6.12.0",
|
||||||
|
"eslint-plugin-import": "^2.22.1",
|
||||||
|
"eslint-plugin-jsx-a11y": "^6.3.1",
|
||||||
|
"eslint-plugin-prettier": "^3.1.4",
|
||||||
|
"eslint-plugin-react": "^7.21.2",
|
||||||
|
"eslint-plugin-react-hooks": "^4.1.2",
|
||||||
|
"prettier": "^2.1.2",
|
||||||
"typescript": "^4.0.3"
|
"typescript": "^4.0.3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
import Head from 'next/head'
|
|
||||||
|
|
||||||
import { Card, Alert, Statistic, Row, Col } from "antd";
|
import { Card, Alert, Statistic, Row, Col } from "antd";
|
||||||
import { LikeOutlined } from "@ant-design/icons";
|
import { LikeOutlined } from "@ant-design/icons";
|
||||||
|
|
||||||
const { Meta } = Card;
|
const { Meta } = Card;
|
||||||
|
|
||||||
export default function Home() {
|
export default function Home() {
|
||||||
|
|
Loading…
Reference in a new issue