Skip to content
This repository has been archived by the owner on Sep 25, 2023. It is now read-only.

Commit

Permalink
Oppdatere pakker, dependencies, storybook
Browse files Browse the repository at this point in the history
  • Loading branch information
frodehansen2 committed May 10, 2023
1 parent 4fa9e8b commit c3571f3
Show file tree
Hide file tree
Showing 17 changed files with 27,879 additions and 48,330 deletions.
14 changes: 14 additions & 0 deletions .babelrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"sourceType": "unambiguous",
"presets": [
[
"@babel/preset-env",
{
"targets": {
"chrome": 100
}
}
]
],
"plugins": []
}
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
11 changes: 11 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/config@2.3.0/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "restricted",
"baseBranch": "master",
"updateInternalDependencies": "patch",
"ignore": []
}
5 changes: 5 additions & 0 deletions .changeset/thick-turkeys-switch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@navikt/ds-datepicker': minor
---

Oppdatere dependencies, peerDeps, storybook
20 changes: 10 additions & 10 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
module.exports = {
parser: '@typescript-eslint/parser',
// Specifies the ESLint parser
extends: [
'plugin:react/recommended',
'plugin:@typescript-eslint/recommended',
'prettier',
'plugin:prettier/recommended',
'plugin:jsx-a11y/recommended',
'plugin:storybook/recommended',
],
parserOptions: {
ecmaFeatures: {
jsx: true, // Allows for the parsing of JSX
jsx: true,
},
},
rules: {
// Place to specify ESLint rules. Can be used to overwrite rules specified from the extended configs
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/explicit-function-return-type': 0,
'@typescript-eslint/explicit-module-boundary-types': 0,
'@typescript-eslint/no-var-requires': 0,
'@typescript-eslint/no-explicit-any': 0,
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'warn',
'react/react-in-jsx-scope': 0,
'react/jsx-uses-react': 0,
'no-console': 'error',
},
plugins: ['jsx-a11y', 'react-hooks'],
settings: {
react: {
version: 'detect', // Tells eslint-plugin-react to automatically detect the version of React to use
version: 'detect',
},
},
ignorePatterns: ['node_modules', 'dist', 'lib', '.turbo'],
};
25 changes: 16 additions & 9 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
const MiniCssExtractPlugin = require('mini-css-extract-plugin');

module.exports = {
stories: ['../src/storybook/**/*.stories.@(js|jsx|ts|tsx)'],
addons: ['@storybook/addon-links', '@storybook/addon-essentials', '@storybook/addon-a11y'],
framework: '@storybook/react',
core: {
builder: 'webpack5',
addons: [
'@storybook/addon-links',
'@storybook/addon-essentials',
'@storybook/addon-a11y',
'@storybook/preset-create-react-app',
],
framework: {
name: '@storybook/react-webpack5',
options: {},
},
webpackFinal: async (config) => {
//Fjern default svg-loader
Expand All @@ -15,14 +19,16 @@ module.exports = {
}
return data;
});

config.devtool = 'source-map';

// Make whatever fine-grained changes you need
config.module.rules = config.module.rules.concat(
{
test: /\.svg$/,
use: { loader: 'svg-sprite-loader', options: {} },
use: {
loader: 'svg-sprite-loader',
options: {},
},
},
{
test: /\.less$/,
Expand Down Expand Up @@ -51,16 +57,17 @@ module.exports = {
],
}
);

config.plugins.push(
new MiniCssExtractPlugin({
filename: 'css/[name].css?[hash]-[chunkhash]-[contenthash]-[name]',
})
);

config.resolve.extensions.push('.ts', '.tsx');

// Return the altered config
return config;
},
docs: {
autodocs: true,
},
};
Loading

0 comments on commit c3571f3

Please sign in to comment.