Skip to content

Commit

Permalink
add linting config, and lint files before commit
Browse files Browse the repository at this point in the history
  • Loading branch information
audisaudisaudis committed Oct 29, 2024
1 parent 87ed181 commit 266ff87
Show file tree
Hide file tree
Showing 4 changed files with 1,719 additions and 167 deletions.
72 changes: 71 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,73 @@
{
"extends": "next/core-web-vitals"
"extends": [
"eslint:recommended",
"plugin:@next/next/recommended",
"airbnb",
"next/core-web-vitals",
"prettier",
"plugin:jsx-a11y/recommended"
],
"plugins": ["react", "prettier"],
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 2020,
"sourceType": "module"
},
"rules": {
"no-underscore-dangle": "off",
"import/prefer-default-export": "off",
"react/jsx-no-bind": "off",
"react/no-unescaped-entities": "off",
"prettier/prettier": "error",
"react/react-in-jsx-scope": "off",
"react/jsx-props-no-spreading": "off",
"react/forbid-prop-types": "off",
"object-shorthand": "off",
"no-use-before-define": "off",
"react/require-default-props": [
"error",
{
"ignoreFunctionalComponents": true
}
],
"singleQuote": "off"
},
"settings": {
"import/resolver": {
"alias": {
"extensions": [".js", ".jsx"],
"map": [["@/app", "./src/app"]]
}
},
"jsx-a11y": {
"polymorphicPropName": "as",
"components": {
"BodyLong": "p",
"BodyShort": "p",
"Button": "button",
"CheckboxGroup": "fieldset",
"Checkbox": "input",
"Chips": "ul",
"Heading": "h",
"Icon": "svg",
"IconButton": "button",
"Image": "img",
"Input": "input",
"Link": "a",
"List": "ul",
"ListItem": "li",
"NextImage": "img",
"NextLink": "a",
"Pagination": "nav",
"RadioGroup": "fieldset",
"Radio": "input",
"Select": "select",
"TextField": "input",
"Textarea": "textarea",
"Tooltip": "button"
}
}
}
}
3 changes: 3 additions & 0 deletions .stylelintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": ["stylelint-config-recommended", "@navikt/aksel-stylelint/recommended"]
}
Loading

0 comments on commit 266ff87

Please sign in to comment.