From 1c164c437659f878e2488cf7c8fbf673cdb37fa0 Mon Sep 17 00:00:00 2001 From: Paul Chavard <github@paul.chavard.net> Date: Wed, 10 Feb 2021 19:02:24 +0100 Subject: [PATCH] Use jsx extension --- app/javascript/components/{Chartkick.js => Chartkick.jsx} | 0 .../{ComboAdresseSearch.js => ComboAdresseSearch.jsx} | 0 ...uaireEducationSearch.js => ComboAnnuaireEducationSearch.jsx} | 0 .../{ComboCommunesSearch.js => ComboCommunesSearch.jsx} | 0 .../{ComboDepartementsSearch.js => ComboDepartementsSearch.jsx} | 0 .../components/{ComboPaysSearch.js => ComboPaysSearch.jsx} | 0 .../{ComboRegionsSearch.js => ComboRegionsSearch.jsx} | 0 app/javascript/components/{ComboSearch.js => ComboSearch.jsx} | 0 app/javascript/components/{Loadable.js => Loadable.jsx} | 0 app/javascript/components/MapEditor/{index.js => index.jsx} | 0 app/javascript/components/MapReader/{index.js => index.jsx} | 0 .../components/{DescriptionInput.js => DescriptionInput.jsx} | 0 .../components/{LibelleInput.js => LibelleInput.jsx} | 0 .../components/{MandatoryInput.js => MandatoryInput.jsx} | 0 .../components/{MoveButton.js => MoveButton.jsx} | 0 .../components/{TypeDeChamp.js => TypeDeChamp.jsx} | 0 .../{TypeDeChampCarteOption.js => TypeDeChampCarteOption.jsx} | 0 .../{TypeDeChampCarteOptions.js => TypeDeChampCarteOptions.jsx} | 0 ...DeChampDropDownOptions.js => TypeDeChampDropDownOptions.jsx} | 0 ...pPieceJustificative.js => TypeDeChampPieceJustificative.jsx} | 0 ...ampRepetitionOptions.js => TypeDeChampRepetitionOptions.jsx} | 0 .../{TypeDeChampTypesSelect.js => TypeDeChampTypesSelect.jsx} | 0 .../components/{TypeDeChamps.js => TypeDeChamps.jsx} | 0 .../components/TypesDeChampEditor/{index.js => index.jsx} | 0 .../components/TypesDeChampEditor/{utils.js => utils.jsx} | 0 .../shared/mapbox/{SwitchMapStyle.js => SwitchMapStyle.jsx} | 0 config/webpacker.yml | 1 + package.json | 2 +- 28 files changed, 2 insertions(+), 1 deletion(-) rename app/javascript/components/{Chartkick.js => Chartkick.jsx} (100%) rename app/javascript/components/{ComboAdresseSearch.js => ComboAdresseSearch.jsx} (100%) rename app/javascript/components/{ComboAnnuaireEducationSearch.js => ComboAnnuaireEducationSearch.jsx} (100%) rename app/javascript/components/{ComboCommunesSearch.js => ComboCommunesSearch.jsx} (100%) rename app/javascript/components/{ComboDepartementsSearch.js => ComboDepartementsSearch.jsx} (100%) rename app/javascript/components/{ComboPaysSearch.js => ComboPaysSearch.jsx} (100%) rename app/javascript/components/{ComboRegionsSearch.js => ComboRegionsSearch.jsx} (100%) rename app/javascript/components/{ComboSearch.js => ComboSearch.jsx} (100%) rename app/javascript/components/{Loadable.js => Loadable.jsx} (100%) rename app/javascript/components/MapEditor/{index.js => index.jsx} (100%) rename app/javascript/components/MapReader/{index.js => index.jsx} (100%) rename app/javascript/components/TypesDeChampEditor/components/{DescriptionInput.js => DescriptionInput.jsx} (100%) rename app/javascript/components/TypesDeChampEditor/components/{LibelleInput.js => LibelleInput.jsx} (100%) rename app/javascript/components/TypesDeChampEditor/components/{MandatoryInput.js => MandatoryInput.jsx} (100%) rename app/javascript/components/TypesDeChampEditor/components/{MoveButton.js => MoveButton.jsx} (100%) rename app/javascript/components/TypesDeChampEditor/components/{TypeDeChamp.js => TypeDeChamp.jsx} (100%) rename app/javascript/components/TypesDeChampEditor/components/{TypeDeChampCarteOption.js => TypeDeChampCarteOption.jsx} (100%) rename app/javascript/components/TypesDeChampEditor/components/{TypeDeChampCarteOptions.js => TypeDeChampCarteOptions.jsx} (100%) rename app/javascript/components/TypesDeChampEditor/components/{TypeDeChampDropDownOptions.js => TypeDeChampDropDownOptions.jsx} (100%) rename app/javascript/components/TypesDeChampEditor/components/{TypeDeChampPieceJustificative.js => TypeDeChampPieceJustificative.jsx} (100%) rename app/javascript/components/TypesDeChampEditor/components/{TypeDeChampRepetitionOptions.js => TypeDeChampRepetitionOptions.jsx} (100%) rename app/javascript/components/TypesDeChampEditor/components/{TypeDeChampTypesSelect.js => TypeDeChampTypesSelect.jsx} (100%) rename app/javascript/components/TypesDeChampEditor/components/{TypeDeChamps.js => TypeDeChamps.jsx} (100%) rename app/javascript/components/TypesDeChampEditor/{index.js => index.jsx} (100%) rename app/javascript/components/TypesDeChampEditor/{utils.js => utils.jsx} (100%) rename app/javascript/components/shared/mapbox/{SwitchMapStyle.js => SwitchMapStyle.jsx} (100%) diff --git a/app/javascript/components/Chartkick.js b/app/javascript/components/Chartkick.jsx similarity index 100% rename from app/javascript/components/Chartkick.js rename to app/javascript/components/Chartkick.jsx diff --git a/app/javascript/components/ComboAdresseSearch.js b/app/javascript/components/ComboAdresseSearch.jsx similarity index 100% rename from app/javascript/components/ComboAdresseSearch.js rename to app/javascript/components/ComboAdresseSearch.jsx diff --git a/app/javascript/components/ComboAnnuaireEducationSearch.js b/app/javascript/components/ComboAnnuaireEducationSearch.jsx similarity index 100% rename from app/javascript/components/ComboAnnuaireEducationSearch.js rename to app/javascript/components/ComboAnnuaireEducationSearch.jsx diff --git a/app/javascript/components/ComboCommunesSearch.js b/app/javascript/components/ComboCommunesSearch.jsx similarity index 100% rename from app/javascript/components/ComboCommunesSearch.js rename to app/javascript/components/ComboCommunesSearch.jsx diff --git a/app/javascript/components/ComboDepartementsSearch.js b/app/javascript/components/ComboDepartementsSearch.jsx similarity index 100% rename from app/javascript/components/ComboDepartementsSearch.js rename to app/javascript/components/ComboDepartementsSearch.jsx diff --git a/app/javascript/components/ComboPaysSearch.js b/app/javascript/components/ComboPaysSearch.jsx similarity index 100% rename from app/javascript/components/ComboPaysSearch.js rename to app/javascript/components/ComboPaysSearch.jsx diff --git a/app/javascript/components/ComboRegionsSearch.js b/app/javascript/components/ComboRegionsSearch.jsx similarity index 100% rename from app/javascript/components/ComboRegionsSearch.js rename to app/javascript/components/ComboRegionsSearch.jsx diff --git a/app/javascript/components/ComboSearch.js b/app/javascript/components/ComboSearch.jsx similarity index 100% rename from app/javascript/components/ComboSearch.js rename to app/javascript/components/ComboSearch.jsx diff --git a/app/javascript/components/Loadable.js b/app/javascript/components/Loadable.jsx similarity index 100% rename from app/javascript/components/Loadable.js rename to app/javascript/components/Loadable.jsx diff --git a/app/javascript/components/MapEditor/index.js b/app/javascript/components/MapEditor/index.jsx similarity index 100% rename from app/javascript/components/MapEditor/index.js rename to app/javascript/components/MapEditor/index.jsx diff --git a/app/javascript/components/MapReader/index.js b/app/javascript/components/MapReader/index.jsx similarity index 100% rename from app/javascript/components/MapReader/index.js rename to app/javascript/components/MapReader/index.jsx diff --git a/app/javascript/components/TypesDeChampEditor/components/DescriptionInput.js b/app/javascript/components/TypesDeChampEditor/components/DescriptionInput.jsx similarity index 100% rename from app/javascript/components/TypesDeChampEditor/components/DescriptionInput.js rename to app/javascript/components/TypesDeChampEditor/components/DescriptionInput.jsx diff --git a/app/javascript/components/TypesDeChampEditor/components/LibelleInput.js b/app/javascript/components/TypesDeChampEditor/components/LibelleInput.jsx similarity index 100% rename from app/javascript/components/TypesDeChampEditor/components/LibelleInput.js rename to app/javascript/components/TypesDeChampEditor/components/LibelleInput.jsx diff --git a/app/javascript/components/TypesDeChampEditor/components/MandatoryInput.js b/app/javascript/components/TypesDeChampEditor/components/MandatoryInput.jsx similarity index 100% rename from app/javascript/components/TypesDeChampEditor/components/MandatoryInput.js rename to app/javascript/components/TypesDeChampEditor/components/MandatoryInput.jsx diff --git a/app/javascript/components/TypesDeChampEditor/components/MoveButton.js b/app/javascript/components/TypesDeChampEditor/components/MoveButton.jsx similarity index 100% rename from app/javascript/components/TypesDeChampEditor/components/MoveButton.js rename to app/javascript/components/TypesDeChampEditor/components/MoveButton.jsx diff --git a/app/javascript/components/TypesDeChampEditor/components/TypeDeChamp.js b/app/javascript/components/TypesDeChampEditor/components/TypeDeChamp.jsx similarity index 100% rename from app/javascript/components/TypesDeChampEditor/components/TypeDeChamp.js rename to app/javascript/components/TypesDeChampEditor/components/TypeDeChamp.jsx diff --git a/app/javascript/components/TypesDeChampEditor/components/TypeDeChampCarteOption.js b/app/javascript/components/TypesDeChampEditor/components/TypeDeChampCarteOption.jsx similarity index 100% rename from app/javascript/components/TypesDeChampEditor/components/TypeDeChampCarteOption.js rename to app/javascript/components/TypesDeChampEditor/components/TypeDeChampCarteOption.jsx diff --git a/app/javascript/components/TypesDeChampEditor/components/TypeDeChampCarteOptions.js b/app/javascript/components/TypesDeChampEditor/components/TypeDeChampCarteOptions.jsx similarity index 100% rename from app/javascript/components/TypesDeChampEditor/components/TypeDeChampCarteOptions.js rename to app/javascript/components/TypesDeChampEditor/components/TypeDeChampCarteOptions.jsx diff --git a/app/javascript/components/TypesDeChampEditor/components/TypeDeChampDropDownOptions.js b/app/javascript/components/TypesDeChampEditor/components/TypeDeChampDropDownOptions.jsx similarity index 100% rename from app/javascript/components/TypesDeChampEditor/components/TypeDeChampDropDownOptions.js rename to app/javascript/components/TypesDeChampEditor/components/TypeDeChampDropDownOptions.jsx diff --git a/app/javascript/components/TypesDeChampEditor/components/TypeDeChampPieceJustificative.js b/app/javascript/components/TypesDeChampEditor/components/TypeDeChampPieceJustificative.jsx similarity index 100% rename from app/javascript/components/TypesDeChampEditor/components/TypeDeChampPieceJustificative.js rename to app/javascript/components/TypesDeChampEditor/components/TypeDeChampPieceJustificative.jsx diff --git a/app/javascript/components/TypesDeChampEditor/components/TypeDeChampRepetitionOptions.js b/app/javascript/components/TypesDeChampEditor/components/TypeDeChampRepetitionOptions.jsx similarity index 100% rename from app/javascript/components/TypesDeChampEditor/components/TypeDeChampRepetitionOptions.js rename to app/javascript/components/TypesDeChampEditor/components/TypeDeChampRepetitionOptions.jsx diff --git a/app/javascript/components/TypesDeChampEditor/components/TypeDeChampTypesSelect.js b/app/javascript/components/TypesDeChampEditor/components/TypeDeChampTypesSelect.jsx similarity index 100% rename from app/javascript/components/TypesDeChampEditor/components/TypeDeChampTypesSelect.js rename to app/javascript/components/TypesDeChampEditor/components/TypeDeChampTypesSelect.jsx diff --git a/app/javascript/components/TypesDeChampEditor/components/TypeDeChamps.js b/app/javascript/components/TypesDeChampEditor/components/TypeDeChamps.jsx similarity index 100% rename from app/javascript/components/TypesDeChampEditor/components/TypeDeChamps.js rename to app/javascript/components/TypesDeChampEditor/components/TypeDeChamps.jsx diff --git a/app/javascript/components/TypesDeChampEditor/index.js b/app/javascript/components/TypesDeChampEditor/index.jsx similarity index 100% rename from app/javascript/components/TypesDeChampEditor/index.js rename to app/javascript/components/TypesDeChampEditor/index.jsx diff --git a/app/javascript/components/TypesDeChampEditor/utils.js b/app/javascript/components/TypesDeChampEditor/utils.jsx similarity index 100% rename from app/javascript/components/TypesDeChampEditor/utils.js rename to app/javascript/components/TypesDeChampEditor/utils.jsx diff --git a/app/javascript/components/shared/mapbox/SwitchMapStyle.js b/app/javascript/components/shared/mapbox/SwitchMapStyle.jsx similarity index 100% rename from app/javascript/components/shared/mapbox/SwitchMapStyle.js rename to app/javascript/components/shared/mapbox/SwitchMapStyle.jsx diff --git a/config/webpacker.yml b/config/webpacker.yml index 46ed57ddb..9dbaca154 100644 --- a/config/webpacker.yml +++ b/config/webpacker.yml @@ -36,6 +36,7 @@ default: &default extensions: - .mjs - .js + - .jsx - .sass - .scss - .css diff --git a/package.json b/package.json index a6dc72d0d..4a32c6266 100644 --- a/package.json +++ b/package.json @@ -53,7 +53,7 @@ "webpack-dev-server": "^3.11.0" }, "scripts": { - "lint:js": "eslint ./app/javascript ./config/webpack", + "lint:js": "eslint --ext .js,.jsx,.ts,.tsx ./app/javascript ./config/webpack", "webpack:build": "NODE_ENV=production bin/webpack", "graphql:docs:build": "graphdoc --force", "graphql:docs:deploy": "netlify deploy -d ./docs/graphql --prod",