Skip to content
This repository was archived by the owner on Aug 4, 2025. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
{
"presets": ["react","env","stage-0"],
"env": {
"test": {
"plugins": ["require-context-hook"]
}
}
"presets": [
"@babel/preset-react",
[
"@babel/preset-env",
{
"targets": {
"esmodules": true
}
}
]
]
}
83 changes: 63 additions & 20 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,41 +1,84 @@
{
"plugins": [
"babel"
],
"parser": "babel-eslint",
"plugins": ["babel", "react", "react-hooks", "@typescript-eslint"],

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think it could be worth us creating an uptick/lint-config package to keep all our standard eslint (and prettier) rules in the one place? It'll make it easy for us to have the one, unified uptick standard across the board.

As a side-thought, this would be nice too - just want to drop the idea of it though:
https://github.com/tclindner/npm-package-json-lint

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking the same thing. I think we should all have a standardised version which should be version controlled and then be available via npm :)

"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"legacyDecorators": true
}
},
"settings": {
"react": {
"version": "detect"
}
},
"rules": {
"comma-dangle": ["error", "always-multiline"],
"space-before-function-paren": ["error", {
"anonymous": "never",
"named": "never",
"asyncArrow": "always"
}],
"camelcase": "off",
"comma-dangle": [
"error",
{
"arrays": "always-multiline",
"objects": "always-multiline",
"imports": "always-multiline",
"exports": "always-multiline",
"functions": "never"
}
],
"space-before-function-paren": [
"error",
{
"anonymous": "never",
"named": "never",
"asyncArrow": "always"
}
],
"jsx-quotes": ["error", "prefer-double"],
"no-var": "error",
"prefer-const": "warn",

"babel/no-invalid-this": "warn",
"babel/semi": ["error", "never"],
"react/prop-types": "warn",
"new-cap": [
"error",
{
"newIsCapExceptions": ["api.batch"],
"capIsNew": false
}
],
"no-invalid-this": "warn",
"no-unused-expressions": "error",
"semi": ["error", "never"],
"lines-between-class-members": [
"error",
"always",
{ "exceptAfterSingleLine": true }
],
"react/prop-types": "off",
"react/jsx-handler-names": "off",
"react/jsx-indent": [
"error",
2,
{ "checkAttributes": false, "indentLogicalExpressions": true }
],
"react/jsx-pascal-case": ["error", { "allowAllCaps": true }],
"react/jsx-uses-react": "error",
"react/jsx-uses-vars": "error",
"react/no-unused-state": "warn",
"react/no-access-state-in-setstate": "warn",
"object-curly-spacing": "off"
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
"object-curly-spacing": "off",
"multiline-ternary": "off",
"no-use-before-define": "off"
},
"overrides": [
{
"files": [ "*.test.js", "*.stories.js" ],
"files": ["*.test.js", "*.stories.js"],
"rules": {
"react/prop-types": "off"
}
}
],
"extends": ["standard", "standard-react"],
"env": {
"browser": true,
"jest": true,
"browser": true,
"jasmine": true
},
"globals": {
"mapboxgl": true
}
}
10 changes: 4 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
node_modules/
dist/
demo-site/_site/
/cells.js
/filters.js
/main.js
/renderers.js
/utils.js
/icons.js
coverage/
.vscode/
.DS_Store

**~

bundle-analysis.json
stats.html

*.log

demo-site/.jekyll-cache
2 changes: 0 additions & 2 deletions .jest/register-context.js

This file was deleted.

6 changes: 6 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"semi": false,
"singleQuote": true,
"useTabs": false,
"tabWidth": 2
}
20 changes: 0 additions & 20 deletions .storybook/Storyshots.test.js

This file was deleted.

1 change: 0 additions & 1 deletion .storybook/addons.js

This file was deleted.

15 changes: 0 additions & 15 deletions .storybook/config.js

This file was deleted.

30 changes: 30 additions & 0 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// .storybook/main.js

const path = require('path');

// Export a function. Accept the base config as the only param.
module.exports = {

stories: ["../src/**/*.stories.js"],

webpackFinal: async (config, { configType }) => {
config.module.rules.push({
test: /\.(scss|sass|css)$/,
use: [{
loader: 'style-loader' // creates style nodes from JS strings
}, {
loader: 'css-loader' // translates CSS into CommonJS
}, {
loader: 'resolve-url-loader' // resolve relative urls inside the css files
},{
loader: 'sass-loader?sourceMap' // compiles Sass to CSS
}],
include: [
path.resolve(__dirname, '../src'),
path.resolve(__dirname, '../node_modules/@fortawesome'),
],
});
// Return the altered config
return config;
},
}
4 changes: 4 additions & 0 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import React from 'react';
import "../dist/react-object-list.css"

export const decorators = [(Story) => <Story/>];
35 changes: 0 additions & 35 deletions .storybook/webpack.config.js

This file was deleted.

15 changes: 3 additions & 12 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
module.exports = {
setupFiles: ['./.jest/jest.setup.js', './.jest/register-context.js'],
snapshotSerializers: ['enzyme-to-json/serializer'],
modulePaths: [
'.',
preset: 'ts-jest/presets/js-with-babel',
setupFilesAfterEnv: [
'<rootDir>/setupTests.js',
],
moduleNameMapper: {
'\\.(css|less|sass)$': '<rootDir>/__mocks__/styleMock.js',
},
collectCoverageFrom: [
'src/**/*.js',
'!src/**/*.stories.js',
],
testURL: 'http://localhost/',
}
Loading